-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
51 lines (43 loc) · 1.19 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
image: node:18
stages:
- test
- deploy
# About installation of bump-cli as node package.
# Script here assume that node package 'bump-cli' has previously beeing installed,
# and is available in package.json (More information about our CLI: https://github.com/bump-sh/cli)
# You can also let npm install the package itself:
# In this case, script here can be adapted:
# - 'cache' and 'before_script' can be removed
# - remplace every call to 'bump' package by 'bump-cli', for example:
# - npm exec -- bump-cli deploy --dry-run 'path/to/your/file' for validation
cache:
key:
files:
- package-lock.json
paths:
- .npm/
- node_modules/
before_script:
- npm ci --cache .npm --prefer-offline
validate_doc:
stage: test
script:
- npm exec -- bump deploy --dry-run "bump.openapi.v3.yml" --doc "$BUMP_ID" --token "$BUMP_TOKEN"
only:
- branches
except:
- main
deploy_doc:
stage: deploy
script:
- npm exec -- bump deploy "bump.openapi.v3.yml" --doc "$BUMP_ID" --token "$BUMP_TOKEN"
only:
- main
diff_doc:
stage: test
script:
- sh ./.gitlab/diff-comment-mr.sh "bump.openapi.v3.yml" "$BUMP_ID" "$BUMP_TOKEN"
only:
- merge_requests
except:
- main