update: jenkinsfile code for multibranch pipeline

This commit is contained in:
adelyaou 2025-10-23 17:47:12 +07:00
parent fec8b625e4
commit b492497906
1 changed files with 2 additions and 2 deletions

4
Jenkinsfile vendored
View File

@ -83,8 +83,8 @@ pipeline {
git checkout ${envName} || git checkout -b ${envName}
# Update backend & frontend image tags di overlay sesuai environment
yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-be:${envName}-${env.IMAGE_TAG_FINAL}"' overlays/${envName}/backend/patch-deployment.yaml
yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-fe:${envName}-${env.IMAGE_TAG_FINAL}"' overlays/${envName}/frontend/patch-deployment.yaml
yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-be:${envName}-${env.IMAGE_TAG_FINAL}"' overlays/${envName}/patch-deployment.yaml
yq e -i '.spec.template.spec.containers[0].image = "${REGISTRY}/${APP_NAME}-fe:${envName}-${env.IMAGE_TAG_FINAL}"' overlays/${envName}/patch-deployment.yaml
git add overlays/${envName}/backend/patch-deployment.yaml overlays/${envName}/frontend/patch-deployment.yaml
git commit -m "chore(${envName}): update image tags to ${envName}-${env.IMAGE_TAG_FINAL}" || echo "No changes for ${envName}"