Update vars/makeHelmChart.groovy

This commit is contained in:
2025-05-30 13:42:24 +03:00
parent 0d49a2d180
commit ad9fd78133

View File

@@ -1,7 +1,7 @@
def call(String chartPath, String appName, String version) { def call(String chartPath, String appName, String version) {
container('helm') { container('helm') {
sh "sed -i 's/^version:.*/version: ${version}/' ${chartPath}/Chart.yaml" sh "sed -i 's/^version:.*/version: ${version}/' ${chartPath}/Chart.yaml"
sh "sed -i 's|docker.io/root/example-app:1.0.0|localhost:31050/my-docker-repo/${appName}:${version}|' ${chartPath}/values.yaml" sh "sed -i 's|docker.io/root/${appName}:1.0.0|localhost:31050/my-docker-repo/${appName}:${version}|' ${chartPath}/values.yaml"
sh "helm package ${chartPath}" sh "helm package ${chartPath}"
echo "Helm chart packaged successfully: ${chartPath}" echo "Helm chart packaged successfully: ${chartPath}"
} }