summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2024-02-17 13:42:34 +0300
committerAndrew Dolgov <[email protected]>2024-02-17 13:42:34 +0300
commit19b3e7fff80d430a9f287138f9cf84a1faa681fd (patch)
tree9c6d7e9372d88d1905606586103be120c45d7682
parenta9016d6a18a00f9d584191910fe8637d27bbd8f7 (diff)
switch to git-based demo
-rw-r--r--.gitlab-ci.yml20
1 files changed, 13 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 195a9bd..00bac41 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -54,12 +54,18 @@ the-epube-web-nginx:branch:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile
update-demo:
- extends: .deploy-helm-chart
- variables:
- HELM_CHART: oci://registry.fakecake.org/infra/helm-charts/the-epube
- HELM_VALUES: .helm/values-demo.yaml
- HELM_RELEASE: the-epube-demo
- HELM_ARGS: --set imageTag=${CI_COMMIT_SHORT_SHA}
+ image: ${INFRA_IMAGE}
rules:
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_REGISTRY_USER != null && $UPDATE_DEMO == "true"
+ - 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
+