summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2024-02-18 18:37:43 +0300
committerAndrew Dolgov <[email protected]>2024-02-18 18:37:43 +0300
commitb9ef122bc2e47997a32aba8959371edec543a08f (patch)
tree87c9f30d3dc59fcf433210bd3af08c87a62c7f54
parent5ba3f6ef77410f03341aecc111058b9ee82d56b4 (diff)
add update-prod job
-rw-r--r--.gitlab-ci.yml15
1 files changed, 15 insertions, 0 deletions
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 "[email protected]"
+ - 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