From a08074323bf316b3a5872563ecd5ec2ba245ff93 Mon Sep 17 00:00:00 2001 From: Jessica Thomas Date: Fri, 26 Jan 2024 12:17:28 -0600 Subject: [PATCH] add job to deploy kobocat to staging if branch starts with feature/ --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05bf86b75..5b2a54375 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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