-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
35 lines (32 loc) · 943 Bytes
/
Copy path.gitlab-ci.yml
File metadata and controls
35 lines (32 loc) · 943 Bytes
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
stages:
- check
variables:
DANGER_GITLAB_API_TOKEN: 'BBBBBBBBBBBBBBB'
DANGER_GITLAB_HOST: 'https://gitlab.example.com'
DANGER_GITLAB_API_BASE_URL: 'https://gitlab.example.com/api/v4'
cache:
key: ${CI_JOB_NAME}
paths:
- .npm/
- "**/node_modules/"
- "**/.pnpm-store/"
- "**/.yarn-cache/"
- .yarn
danger-check:
# slim no wget/curl
image: node:14.18.0-alpine3.14
stage: check
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
when: always
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
when: always
script:
- echo "check dependencies..."
# disable exit when error occurred
- set +e
- hash danger 2>/dev/null && echo "use cache" || yarn global add danger@10.6.0 --skip-integrity-check --no-progress --cache-folder .yarn --global-folder .yarn-cache
# enable exit
- set -e
- echo "run ci command..."
- danger ci --failOnErrors -v