-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
90 lines (80 loc) · 1.32 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
image: node:14
stages:
- Prepare
- Lint
- Dry-run
- Security
- Run
cache: &global_cache
key:
files:
- package-lock.json
paths:
- node_modules
policy: pull
prepare:
stage: Prepare
cache:
# inherit global_cache properties, override policy
<<: *global_cache
policy: pull-push
before_script:
- node --version
- npm --version
script:
- npm install
lint:
except:
- schedules
stage: Lint
script:
- npm run lint:ci
dry-run:
except:
- schedules
stage: Dry-run
script:
- npm run renovate:dry-run
audit:
except:
- schedules
stage: Security
script:
- npm audit
lockfile_lint:
except:
- schedules
stage: Security
script:
- npm run lockfile-lint
run:
only:
refs:
- schedules
variables:
- $IS_SNYK_RUN != "true"
stage: Run
script:
- npm run renovate
snyk_test:
only:
refs:
- schedules
variables:
- $IS_SNYK_RUN == "true" && $IS_WEEKLY_RUN != "true"
stage: Security
before_script:
- npm run snyk:auth "$SNYK_TOKEN"
script:
- npm run snyk:test
snyk_monitor:
only:
refs:
- schedules
variables:
- $IS_SNYK_RUN == "true" && $IS_WEEKLY_RUN == "true"
stage: Security
before_script:
- npm run snyk:auth "$SNYK_TOKEN"
script:
- npm run snyk:monitor