Update Jenkinsfile
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
This commit is contained in:
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@@ -80,6 +80,38 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Update helm chart repository') {
|
||||
when {
|
||||
branch 'development'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def newTag = "0.${env.BUILD_ID}"
|
||||
def chartRepo = "https://jenkins:${env.TOKEN}@gitea.innovation-hub-niedersachsen.de/innohub/charts.git"
|
||||
def chartPath = "tatort-dev/tatort"
|
||||
|
||||
sh """
|
||||
rm -rf charts-tmp
|
||||
git clone ${chartRepo} charts-tmp
|
||||
cd charts-tmp/${chartPath}
|
||||
|
||||
# update image tag in values.yaml
|
||||
sed -i 's/^ tag: .*/ tag: ${newTag}/' values.yaml
|
||||
|
||||
# optional: bump version in Chart.yaml
|
||||
sed -i 's/^version: .*/version: ${newTag}/' Chart.yaml
|
||||
sed -i 's/^appVersion: .*/appVersion: ${newTag}/' Chart.yaml
|
||||
|
||||
git config user.name 'Jenkins'
|
||||
git config user.email 'jenkins@innohub.local'
|
||||
git add values.yaml Chart.yaml
|
||||
git commit -m 'ci: update tatort-dev chart with image tag ${newTag}'
|
||||
git push origin main
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
Reference in New Issue
Block a user