From 02aea3247b7a1c5bed31bced926e308ad78d360b Mon Sep 17 00:00:00 2001 From: Polo M2B Date: Tue, 11 Jun 2024 09:24:15 +0200 Subject: [PATCH] Complete call to bump cli 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. --- .gitlab-ci.yml | 6 +++--- .gitlab/diff-comment-mr.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62d5dca..47140e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: @@ -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: diff --git a/.gitlab/diff-comment-mr.sh b/.gitlab/diff-comment-mr.sh index 00057c3..8d734e2 100755 --- a/.gitlab/diff-comment-mr.sh +++ b/.gitlab/diff-comment-mr.sh @@ -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() {