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