fix(confidence-engine): bind Jenkins deployment SSH context

This commit is contained in:
2026-09-09 13:19:21 +01:00
parent b964f2f172
commit dafb9ae9b7
Vendored
+13 -10
View File
@@ -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"
'''
}
}
}