Compare commits
2 Commits
fix/cl9-de
...
fix/cl9-us
| Author | SHA1 | Date | |
|---|---|---|---|
| 164e97618e | |||
| 2bb78e9864 |
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -85,18 +85,15 @@ pipeline {
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
withCredentials([sshUserPrivateKey(
|
||||
credentialsId: "${env.DEPLOY_SSH_CREDENTIAL_ID}",
|
||||
keyFileVariable: 'SSH_KEY',
|
||||
usernameVariable: 'SSH_USER'
|
||||
)]) {
|
||||
sh '''
|
||||
sh '''
|
||||
bash <<EOF
|
||||
set -euxo pipefail
|
||||
|
||||
SSH_KEY="/var/lib/jenkins/.ssh/plesk_agency_deploy"
|
||||
SSH_USER="deploy"
|
||||
SSH_OPTS="-i ${SSH_KEY} -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
||||
|
||||
echo "SSH user from credential: ${SSH_USER}"
|
||||
echo "SSH user from configured deploy key: ${SSH_USER}"
|
||||
echo "SSH key file path: ${SSH_KEY}"
|
||||
ls -l "${SSH_KEY}"
|
||||
ssh-keygen -y -f "${SSH_KEY}"
|
||||
@@ -148,8 +145,7 @@ ssh ${SSH_OPTS} "$SSH_USER@$APP_HOST" \
|
||||
echo "Printing final running container image metadata"
|
||||
ssh ${SSH_OPTS} "$SSH_USER@$APP_HOST" "docker inspect plesk-agency-portal --format='{{.Image}} {{.Created}}'"
|
||||
EOF
|
||||
'''
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user