Added 'cd' command to sh blocks
This commit is contained in:
3
.jenkins/Jenkinsfile
vendored
3
.jenkins/Jenkinsfile
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user