fix(argo): invalid env ref for ArgoApplicationVersionUpdater
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
cec7ab0ef2
commit
68de66857c
@ -30,12 +30,18 @@ class ArgoApplicationVersionUpdater {
|
|||||||
|
|
||||||
steps.withCredentials([steps.usernamePassword(credentialsId: 'freeleaps-ops-credentials', passwordVariable: 'OPS_GIT_PASSWORD', usernameVariable: 'OPS_GIT_USERNAME')]) {
|
steps.withCredentials([steps.usernamePassword(credentialsId: 'freeleaps-ops-credentials', passwordVariable: 'OPS_GIT_PASSWORD', usernameVariable: 'OPS_GIT_USERNAME')]) {
|
||||||
steps.sh """
|
steps.sh """
|
||||||
|
echo "Install required tools for git..."
|
||||||
|
apt-get -y update && apt-get install -y --no-install-recommends git apt-transport-https ca-certificates curl wget gnupg
|
||||||
|
echo "Configure git user..."
|
||||||
git config user.name "freeleaps-gitops-bot"
|
git config user.name "freeleaps-gitops-bot"
|
||||||
git config user.email "gitops@mathmast.com"
|
git config user.email "gitops@mathmast.com"
|
||||||
|
echo "Add and commit changes..."
|
||||||
git remote add ci_origin https://${steps.env.OPS_GIT_USERNAME}:${steps.env.OPS_GIT_PASSWORD}@dev.azure.com/freeleaps/freeleaps-ops/_git/freeleaps-ops
|
git remote add ci_origin https://${steps.env.OPS_GIT_USERNAME}:${steps.env.OPS_GIT_PASSWORD}@dev.azure.com/freeleaps/freeleaps-ops/_git/freeleaps-ops
|
||||||
git add ${valuesFile}
|
git add ${valuesFile}
|
||||||
git commit -m "ci(bump): bump ${component.name} image version for ${environmentSlug} to ${steps.env.BUILD_IMAGE_VERSION}"
|
git commit -m "ci(bump): bump ${component.name} image version for ${environmentSlug} to ${steps.env.BUILD_IMAGE_VERSION}"
|
||||||
|
echo "Push changes to freeleaps-ops repository..."
|
||||||
git push ci_origin HEAD:master
|
git push ci_origin HEAD:master
|
||||||
|
echo "Done."
|
||||||
"""
|
"""
|
||||||
steps.log.info("ArgoApplicationVersionUpdater", "[${environmentSlug}] ${component.name} image version bump to ${steps.env.BUILD_IMAGE_VERSION}")
|
steps.log.info("ArgoApplicationVersionUpdater", "[${environmentSlug}] ${component.name} image version bump to ${steps.env.BUILD_IMAGE_VERSION}")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user