From b9ef122bc2e47997a32aba8959371edec543a08f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 18 Feb 2024 18:37:43 +0300 Subject: add update-prod job --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00bac41..546da6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,3 +69,18 @@ update-demo: - git commit -m "update image tag to ${CI_COMMIT_SHORT_SHA}" - git push origin master +update-prod: + image: ${INFRA_IMAGE} + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PROD_HELM_TOKEN != null + stage: publish + script: + - git clone https://token:${PROD_HELM_TOKEN}@gitlab.fakecake.org/git/helm-charts/the-epube-prod.git chart + - cd chart + - git config user.name "Gitlab CI" + - git config user.email "noreply@example.com" + - yq -ei '.imageTag = "'${CI_COMMIT_SHORT_SHA}'"' values-demo.yaml + - git diff + - git add . + - git commit -m "update image tag to ${CI_COMMIT_SHORT_SHA}" + - git push origin master -- cgit v1.2.3