From bbfdaf10c45371d2632eff4cfff9d6a4d6d4f97e Mon Sep 17 00:00:00 2001 From: olive-KTB Date: Thu, 16 Jan 2025 02:49:14 +0100 Subject: [PATCH] update gitlab-ci.yml --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53261549c0..bffb6522d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,9 +44,16 @@ deploy-staging: 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 kpi.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values + - | + if [ "$CI_COMMIT_BRANCH" = "main" ]; then + helm -n kobo-dev upgrade staging-main kobo/kobo --atomic --set-string kpi.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values + helm -n kobo-dev upgrade staging-nobill kobo/kobo --atomic --set-string kpi.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values + else + helm -n kobo-dev upgrade --install $BRANCH_TITLE kobo/kobo --atomic --set-string kpi.image.tag=${CI_COMMIT_SHORT_SHA} --reuse-values + fi rules: - if: $CI_COMMIT_BRANCH =~ /^(feature\/)/ && $CI_COMMIT_REF_PROTECTED + - if: $CI_COMMIT_BRANCH == "main" pages: stage: deploy