Skip to content

Commit

Permalink
Complete call to bump cli
Browse files Browse the repository at this point in the history
Add parameters documentation_slug and bump_token.
These can be defined with GitLab CI/CD variables:
https://docs.gitlab.com/ee/ci/variables/index.html#protect-a-cicd-variable

And add simple quotes around 'path/to/specification',
required to run script on GitLab.
  • Loading branch information
Polo2 committed Jun 11, 2024
1 parent 5b57a44 commit 02aea32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_script:
validate_doc:
stage: test
script:
- npm exec -- bump deploy --dry-run bump.openapi.v3.yml
- npm exec -- bump deploy --dry-run 'bump.openapi.v3.yml' --doc documentation_slug --token bump_token
only:
- branches
except:
Expand All @@ -37,14 +37,14 @@ validate_doc:
deploy_doc:
stage: deploy
script:
- npm exec -- bump deploy bump.openapi.v3.yml
- npm exec -- bump deploy 'bump.openapi.v3.yml' --doc documentation_slug --token bump_token
only:
- main

diff_doc:
stage: test
script:
- ./.gitlab/diff-comment-mr.sh bump.openapi.v3.yml
- ./.gitlab/diff-comment-mr.sh 'bump.openapi.v3.yml' bump_token
only:
- merge_requests
except:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/diff-comment-mr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# - 2. The bump slug (`BUMP_ID`)
# - 3. The Bump token (`BUMP_TOKEN`)
#
# Usage: ./diff-comment-mr.sh doc/openapi.yml my-doc my-bump-token-123
# Usage: ./diff-comment-mr.sh 'doc/openapi.yml' my-doc my-bump-token-123
#

bump_preview() {
Expand Down

0 comments on commit 02aea32

Please sign in to comment.