Merge pull request 'fix(ci): run pipeline shell steps using bash to support pipefail' (#40) from fix/cl9-jenkins-bash-shell into master
Reviewed-on: http://gitea.lan:3000/robbond/pleskSaas/pulls/40
This commit was merged in pull request #40.
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -78,6 +78,7 @@ pipeline {
|
||||
keyFileVariable: 'SSH_KEY'
|
||||
)]) {
|
||||
sh '''
|
||||
bash -eo pipefail << 'EOF'
|
||||
set -euo pipefail
|
||||
|
||||
rsync -az \
|
||||
@@ -93,6 +94,7 @@ pipeline {
|
||||
"cd $DEPLOY_PATH && chmod +x ./scripts/deploy-prod.sh ./scripts/smoke-check.sh ./scripts/rollback-prod.sh"
|
||||
|
||||
ssh -i $SSH_KEY $APP_USER@$APP_HOST "cd $DEPLOY_PATH && ./scripts/deploy-prod.sh"
|
||||
EOF
|
||||
'''
|
||||
}
|
||||
}
|
||||
@@ -100,7 +102,13 @@ pipeline {
|
||||
|
||||
stage('Smoke check') {
|
||||
steps {
|
||||
sh 'chmod +x scripts/smoke-check.sh && scripts/smoke-check.sh ${APP_BASE_URL}'
|
||||
sh '''
|
||||
bash -eo pipefail << EOF
|
||||
set -euo pipefail
|
||||
chmod +x scripts/smoke-check.sh
|
||||
scripts/smoke-check.sh "${APP_BASE_URL}"
|
||||
EOF
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user