update: change path image tag

This commit is contained in:
adelyaou 2025-10-23 12:03:52 +07:00
parent 8ef3f54582
commit 343ba2e074
1 changed files with 5 additions and 5 deletions

10
Jenkinsfile vendored
View File

@ -82,8 +82,8 @@ pipeline {
echo "Updating manifests to tag: ${env.IMAGE_TAG_FINAL}" echo "Updating manifests to tag: ${env.IMAGE_TAG_FINAL}"
sh """ sh """
yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-be:${env.IMAGE_TAG_FINAL}"' base/backend/backend-deployment.yaml yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-be:${env.IMAGE_TAG_FINAL}"' patch-deployment.yaml
yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-fe:${env.IMAGE_TAG_FINAL}"' base/frontend/frontend-deployment.yaml yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-fe:${env.IMAGE_TAG_FINAL}"' patch-deployment.yaml
""" """
} }
} }
@ -100,7 +100,7 @@ pipeline {
git add -A git add -A
git diff --staged --quiet || (git commit -m "chore: update image to ${env.IMAGE_TAG_FINAL}" && git push https://${GIT_USER}:${GIT_PASS}@${env.MANIFEST_REPO.replace('https://', '')} ${env.BRANCH}) git diff --staged --quiet || (git commit -m "chore: update image to ${env.IMAGE_TAG_FINAL}" && git push https://${GIT_USER}:${GIT_PASS}@${env.MANIFEST_REPO.replace('https://', '')} ${env.BRANCH})
""" """
echo "Manifest repo updated successfully" echo "Manifest repo updated successfully"
} }
} }
} }
@ -115,10 +115,10 @@ pipeline {
post { post {
success { success {
echo "🎉 GitOps pipeline completed successfully!" echo "GitOps pipeline completed successfully!"
} }
failure { failure {
echo "Pipeline failed. Check previous logs." echo "Pipeline failed. Check previous logs."
} }
} }
} }