diff options
author | Andrew Dolgov <[email protected]> | 2024-02-17 13:42:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2024-02-17 13:42:34 +0300 |
commit | 19b3e7fff80d430a9f287138f9cf84a1faa681fd (patch) | |
tree | 9c6d7e9372d88d1905606586103be120c45d7682 | |
parent | a9016d6a18a00f9d584191910fe8637d27bbd8f7 (diff) |
switch to git-based demo
-rw-r--r-- | .gitlab-ci.yml | 20 |
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 + |