Skip to content

Commit

Permalink
Merge pull request #917 from kobotoolbox/autostage-kobocat-features
Browse files Browse the repository at this point in the history
add job to deploy kobocat to staging if branch starts with 'feature/'
  • Loading branch information
noliveleger committed Jan 26, 2024
2 parents 523fcce + a080743 commit 40736fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,15 @@ deploy-beta:
- gitlab-ci-build
variables:
- $CI_COMMIT_REF_PROTECTED

deploy-staging:
stage: deploy
image:
name: alpine/helm
entrypoint: [""]
script:
- BRANCH_TITLE=${CI_COMMIT_BRANCH#feature/}
- helm repo add kobo https://gitlab.com/api/v4/projects/32216873/packages/helm/stable
- helm -n kobo-dev upgrade --install $BRANCH_TITLE kobo/kobo --atomic --set-string kobocat.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values
rules:
- if: $CI_COMMIT_BRANCH =~ /^(feature\/)/ && $CI_COMMIT_REF_PROTECTED

0 comments on commit 40736fd

Please sign in to comment.