-
Notifications
You must be signed in to change notification settings - Fork 13
/
.gitlab-ci.yml
60 lines (50 loc) · 1.43 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
include:
- local: "/cypress/.gitlab-ci-tests.yml"
image: node:14.16.0-alpine3.13
# any job has pull cache policy, unless specified by cache: {}
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG} # we use per branch caching
paths: [node_modules/]
policy: pull
stages:
- build
- test
- e2e
- combined-coverage-report
build-job:
stage: build
script:
- yarn config set registry https://devops.bt.siemens.com/artifactory/api/npm/npm-all
- yarn install --frozen-lockfile --prefer-offline
tags: [AWS, CLOUD, DEV, DOCKER, HO, HORIZON, INTERNAL, NOPROXY]
cache:
key: ${CI_COMMIT_REF_SLUG} # we use per branch caching
paths: [node_modules/]
policy: pull-push # only the build job has the additional push policy on cache, becauase the subsequent stages need it
unit-test:
stage: test
before_script:
- yarn coverage:reset # reset state at the beginning for new unit + e2e coverage evaluation
script: [yarn test]
tags: [AWS, CLOUD, DEV, DOCKER, HO, HORIZON, INTERNAL, NOPROXY]
artifacts:
paths: [coverage/]
retry:
max: 2
when: runner_system_failure
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: never
- if: $CI_COMMIT_BRANCH
lint:
stage: test
script: [yarn lint]
tags: [AWS, CLOUD, DEV, DOCKER, HO, HORIZON, INTERNAL, NOPROXY]
retry:
max: 2
when: runner_system_failure
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: never
- if: $CI_COMMIT_BRANCH