Add vars/deployArgo.groovy

This commit is contained in:
2025-05-29 17:47:14 +03:00
parent 085e5e8414
commit 8cf2c1f346

13
vars/deployArgo.groovy Normal file
View File

@@ -0,0 +1,13 @@
def call(String releaseName, Map values = [:]) {
container('argocd') {
def argocdCommand = "argocd app set ${releaseName}"
values.each { key, value ->
argocdCommand += " --helm-set ${key}=${value}"
}
sh "${argocdCommand}"
sh "argocd app sync ${releaseName}"
echo "Updated ArgoCD application ${releaseName} with dynamic parameters!"
}
}