-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
86 lines (78 loc) · 1.4 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
stages:
- build
- test
- analysis
- deploy
cache:
key: "PIPELINE-$CI_PIPELINE_ID"
paths:
- node_modules/
app:
stage: build
image: trion/ng-cli:latest
before_script:
- npm ci
script:
- npm run build:prod
artifacts:
expire_in: 1 day
paths:
- dist/
tags:
- bluerunner
documentation:
stage: build
image: trion/ng-cli:latest
script:
- npm run generate:documentation
artifacts:
paths:
- documentation/
tags:
- bluerunner
karma:
stage: test
image: trion/ng-cli-karma:latest
script:
- npm run test:headless
coverage: '/Lines \W+: (\d+\.\d+)%.*/'
artifacts:
paths:
- coverage/
tags:
- bluerunner
e2e:
stage: test
image: trion/ng-cli-e2e:latest
script:
- npm run e2e:headless
tags:
- bluerunner
lint:
stage: analysis
image: trion/ng-cli:latest
script:
- npm run lint
tags:
- bluerunner
sonar:
stage: analysis
image: trion/ng-cli:latest
before_script:
- npm install -g sonarqube-scanner
script:
- sonar-scanner
tags:
- bluerunner
firebase:
stage: deploy
image: trion/ng-cli:latest
before_script:
- npm install -g firebase-tools
only:
- master
script:
- firebase use --token $FIREBASE_DEPLOY_KEY default
- firebase deploy -m "Pipeline $CI_PIPELINE_ID, build $CI_BUILD_ID" --non-interactive --token $FIREBASE_DEPLOY_KEY
tags:
- bluerunner