Added 'cd' command to sh blocks

This commit is contained in:
Marcin-Ramotowski
2025-07-10 22:26:13 +02:00
parent 2f0ab04997
commit d855e795e2

View File

@ -62,8 +62,8 @@ pipeline {
sh 'git clone ${DEPLOY_REPO} --branch fluxcd'
}
}
sh 'cd user-microservice-deploy/apps/user-microservice'
sh '''
cd user-microservice-deploy/apps/user-microservice
# Podmień tag obrazu w pliku deploy.yaml
awk -v commit="$GIT_COMMIT" '
$0 ~ /name:[[:space:]]*api/ { in_api_container = 1; print; next }
@ -79,6 +79,7 @@ pipeline {
sshagent(['gitea-deploy-key']) {
sh '''
cd user-microservice-deploy/apps/user-microservice
git add deploy.yaml
git diff-index --quiet HEAD || git commit -m "JENKINS: Changed deployed version to $GIT_COMMIT"
git push origin fluxcd