summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2024-02-18 19:43:35 +0300
committerAndrew Dolgov <[email protected]>2024-02-18 19:43:35 +0300
commitfc95c988cfbe3114fb13a86f9da7881b2babc80d (patch)
treeb44146c0a7e5634d90750c337254d616097e8234
parent6a51afcfcba0fc2da8a12e19145721ce0dde8bdd (diff)
use update job template
-rw-r--r--.gitlab-ci.yml42
1 files changed, 15 insertions, 27 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e4d1a1e9d..b1f8f8859 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,7 +20,7 @@ include:
file: .ci-integration-test.yml
- project: 'ci/ci-templates'
ref: master
- file: .ci-deploy-helm-chart.yml
+ file: .ci-update-helm-imagetag.yml
phpunit:
extends: .phpunit
@@ -115,34 +115,22 @@ ttrss-fpm-pgsql-static:publish:
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/app/Dockerfile
-update-prod:
- image: ${INFRA_IMAGE}
+update-demo:
+ extends: .update-helm-imagetag
+ variables:
+ CHART_REPO: gitlab.fakecake.org/git/helm-charts/tt-rss.git
+ CHART_VALUES: values-demo.yaml
+ ACCESS_TOKEN: ${DEMO_HELM_TOKEN}
rules:
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PROD_HELM_TOKEN != null
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $DEMO_HELM_TOKEN != null
stage: publish
- script:
- - git clone https://token:${PROD_HELM_TOKEN}@gitlab.fakecake.org/git/helm-charts/tt-rss-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
-update-demo:
- image: ${INFRA_IMAGE}
+update-prod:
+ extends: .update-helm-imagetag
+ variables:
+ CHART_REPO: gitlab.fakecake.org/git/helm-charts/tt-rss-prod.git
+ CHART_VALUES: values-prod.yaml
+ ACCESS_TOKEN: ${PROD_HELM_TOKEN}
rules:
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $DEMO_HELM_TOKEN != null
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PROD_HELM_TOKEN != null
stage: publish
- script:
- - git clone https://token:${DEMO_HELM_TOKEN}@gitlab.fakecake.org/git/helm-charts/tt-rss.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