From 3614c8fa5a28d1f83f858efd040fc4597e537fb7 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Mon, 13 Dec 2021 09:51:29 +0100 Subject: [PATCH] Use chart version, not app version, when bumping version in vs-deployment --- .gitlab-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 027dc75..197a1a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,19 +61,21 @@ integration_test: - wget -q https://github.com/mikefarah/yq/releases/download/v4.14.2/yq_linux_amd64.tar.gz -O - | tar xvfz - && chmod +x yq_linux_amd64 # for testing: # - export SERVICE_NAME=postgresql - # - export CI_COMMIT_TAG=10.12.1 + # - export CHART_VERSION=10.12.1 - - export BRANCH_NAME="auto-update-${SERVICE_NAME}-${CI_COMMIT_TAG}" + - export CHART_VERSION=$(./yq_linux_amd64 eval .version chart/Chart.yaml) + + - export BRANCH_NAME="auto-update-${SERVICE_NAME}-${CHART_VERSION}" - git config --global user.email "gitlab@eox.at" - git config --global user.name "gitlab" - git clone https://${VS_DEPLOYMENT_GIT_REPOSITORY_CREDENTIALS}@gitlab.eox.at/vs/vs-deployment.git - cd vs-deployment - git switch -c "${BRANCH_NAME}" # bump version in Chart.yaml - - ../yq_linux_amd64 eval "( .dependencies[] | select(.name == \"${SERVICE_NAME}\") | .version ) = \"${CI_COMMIT_TAG}\"" --inplace Chart.yaml + - ../yq_linux_amd64 eval "( .dependencies[] | select(.name == \"${SERVICE_NAME}\") | .version ) = \"${CHART_VERSION}\"" --inplace Chart.yaml - helm dependency update - git add charts/* - - git commit --all -m "Bump ${SERVICE_NAME} to ${CI_COMMIT_TAG}" + - git commit --all -m "Bump ${SERVICE_NAME} to ${CHART_VERSION}" - git push --set-upstream origin "${BRANCH_NAME}" only: - tags -- GitLab