summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2024-02-18 19:30:15 +0300
committerAndrew Dolgov <[email protected]>2024-02-18 19:30:15 +0300
commit3837f1aabcd0c9239c7e09b5ddeb8f14ac463b67 (patch)
tree1dadd676a9a85002c9c92d3b6f61c1a43e7a4a0b
parent210d6c87b0be1a92791d93d8d4c6e7203f7a7d08 (diff)
move to template
-rw-r--r--.gitlab-ci.yml32
1 files changed, 9 insertions, 23 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2bfbd7d..2c17a32 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,7 +15,7 @@ include:
file: .ci-lint-common.yml
- project: 'ci/ci-templates'
ref: master
- file: .ci-deploy-helm-chart.yml
+ file: .ci-update-helm-imagetag.yml
eslint:
extends: .eslint
@@ -54,33 +54,19 @@ the-epube-web-nginx:branch:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile
update-demo:
- image: ${INFRA_IMAGE}
+ extends: .update-helm-imagetag
+ variables:
+ CHART_REPO: gitlab.fakecake.org/git/helm-charts/the-epube.git
+ ACCESS_TOKEN: ${DEMO_HELM_TOKEN}
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $DEMO_HELM_TOKEN != null
stage: publish
- script:
- - git clone https://token:${DEMO_HELM_TOKEN}@gitlab.fakecake.org/git/helm-charts/the-epube.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
update-prod:
- image: ${INFRA_IMAGE}
+ extends: .update-helm-imagetag
+ variables:
+ CHART_REPO: gitlab.fakecake.org/git/helm-charts/the-epube-prod.git
+ ACCESS_TOKEN: ${PROD_HELM_TOKEN}
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-prod.yaml
- - git diff
- - git add .
- - git commit -m "update image tag to ${CI_COMMIT_SHORT_SHA}"
- - git push origin master