From d9bcad9f7795592b2273d1a0ac815054f0c9d5b0 Mon Sep 17 00:00:00 2001 From: Daniel Mann Date: Tue, 15 Jul 2025 11:42:23 +0200 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index db91269..7b3097c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -94,40 +94,44 @@ pipeline { ) ]) { script { - def newTag = "0.${env.BUILD_ID}" + def newTag = "0.${env.BUILD_ID}-dev.1" def chartRepo = "https://${GIT_USER}:${GIT_PAT}@gitea.innovation-hub-niedersachsen.de/innohub/charts.git" def chartPath = "tatort-dev/tatort" def chartDir = "charts-tmp/${chartPath}" + def chartRepoRoot = "charts-tmp/tatort-dev" sh """ set -e + echo "[INFO] Cloning chart repo..." rm -rf charts-tmp git clone ${chartRepo} charts-tmp - cd ${chartDir} echo "[INFO] Updating values.yaml and Chart.yaml..." + cd ${chartDir} + sed -i 's|^ repository: .*| repository: gitea.innovation-hub-niedersachsen.de/innohub/tatort-dev|' values.yaml sed -i 's/^ tag: .*/ tag: ${newTag}/' values.yaml sed -i 's/^version: .*/version: ${newTag}/' Chart.yaml sed -i 's/^appVersion: .*/appVersion: ${newTag}/' Chart.yaml - echo "[INFO] Removing old chart packages..." + echo "[INFO] Cleaning up old chart packages..." cd .. + rm -f index.yaml rm -f tatort-*.tgz - echo "[INFO] Packaging chart into parent dir..." + echo "[INFO] Packaging Helm chart..." cd tatort helm package . --destination .. - echo "[INFO] Updating index.yaml in parent dir..." + echo "[INFO] Updating Helm index.yaml..." cd .. helm repo index . --merge index.yaml || helm repo index . - echo "[INFO] Committing Helm chart changes..." + echo "[INFO] Committing and pushing chart changes..." git config user.name "Jenkins" git config user.email "jenkins@innohub.local" git add tatort/values.yaml tatort/Chart.yaml tatort-*.tgz index.yaml - git commit -m "ci: bump tatort chart to ${newTag}, package + index" + git commit -m "ci: bump tatort-dev to ${newTag}, package chart + update index" git push origin main """ }