fix(confidence-engine): bind Jenkins deployment SSH context
This commit is contained in:
Vendored
+13
-10
@@ -76,16 +76,19 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// Run the deployment script on CT 112 via SSH
|
// Run the deployment script on CT 112 via SSH
|
||||||
withCredentials([sshUserPrivateKey(credentialsId: 'confidence-engine-deploy-ssh')]) {
|
withCredentials([sshUserPrivateKey(
|
||||||
sh """
|
credentialsId: 'confidence-engine-deploy-ssh',
|
||||||
ssh -o StrictHostKeyChecking=no \\
|
keyFileVariable: 'SSH_KEY',
|
||||||
root@${TARGET_HOST} \\
|
usernameVariable: 'SSH_USER'
|
||||||
"bash -s" \\
|
)]) {
|
||||||
< ${WORKSPACE}/scripts/deploy-production.sh \\
|
sh '''
|
||||||
"${DEPLOY_SHA}" \\
|
ssh \
|
||||||
"${DEPLOY_DIR}" \\
|
-i "$SSH_KEY" \
|
||||||
"${HEALTH_URL}"
|
-o StrictHostKeyChecking=yes \
|
||||||
"""
|
"$SSH_USER@$TARGET_HOST" \
|
||||||
|
bash -s -- "$DEPLOY_SHA" "$DEPLOY_DIR" "$HEALTH_URL" \
|
||||||
|
< "$WORKSPACE/scripts/deploy-production.sh"
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user