summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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