From a66851aa91f7c8df40641b527b0064ece946f6df Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 12 Oct 2024 17:11:35 -0700 Subject: [PATCH] jenkins: fix hanging on SSH (#33779) --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a98280ccd9..42db027f32 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,10 +12,12 @@ def retryWithDelay(int maxRetries, int delay, Closure body) { def device(String ip, String step_label, String cmd) { withCredentials([file(credentialsId: 'id_rsa', variable: 'key_file')]) { def ssh_cmd = """ -ssh -tt -o ConnectTimeout=5 -o ServerAliveInterval=5 -o ServerAliveCountMax=2 -o BatchMode=yes -o StrictHostKeyChecking=no -i ${key_file} 'comma@${ip}' /usr/bin/bash <<'END' +ssh -o ConnectTimeout=5 -o ServerAliveInterval=5 -o ServerAliveCountMax=2 -o BatchMode=yes -o StrictHostKeyChecking=no -i ${key_file} 'comma@${ip}' exec /usr/bin/bash <<'END' set -e +export TERM=xterm-256color + shopt -s huponexit # kill all child processes when the shell exits export CI=1 @@ -65,8 +67,6 @@ ln -snf ${env.TEST_DIR} /data/pythonpath cd ${env.TEST_DIR} || true ${cmd} -exit 0 - END""" sh script: ssh_cmd, label: step_label