-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
73 lines (64 loc) · 1.07 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
variables:
KUBE_NAMESPACE: ''
stages:
- install
- test
- dependency_check
- package
- build
- post-build
- review
- sonarcloud
- staging
- production
install:
stage: install
image: node:12.10.0
script:
- npm install
artifacts:
expire_in: 1 week
paths:
- node_modules
ESLint:
stage: test
image: node:12.10.0
script:
- npm run lint:js
Stylelint:
stage: test
image: node:12.10.0
script:
- npm run lint:styles
Tests:
variables:
NODE_ENV: testing
stage: test
image: node:12.10.0
script:
- npm run test:coverage
coverage: /All files\s*\|\s*([\d\.]+)/
artifacts:
paths:
- coverage/
Package Code:
variables:
NODE_ENV: production
stage: package
image: node:12.10.0
script:
- npm run build:prod
artifacts:
expire_in: 1 week
paths:
- dist/
Dependency check:
stage: post-build
image: node:12.10.0
script:
- npm audit
# Bad dependencies should not fail build,
# but should instead clearly show it is unhappy
allow_failure: true
only:
- branches