jenkinsfile - watch screen test 7f new ssh method

This commit is contained in:
matt committed 2026-10-18 02:09:33 -07:00
1 parent b85b33a812
commit 0496eb4076
1 file changed
+11 -11
+11 -11
View File
@@ -80,12 +80,12 @@ pipeline {
//while screen -list | grep -q ble_test_${env.TEST_HASH}; do //while screen -list | grep -q ble_test_${env.TEST_HASH}; do
// tail -f /tmp/ble_test_${env.TEST_HASH}.log // tail -f /tmp/ble_test_${env.TEST_HASH}.log
//done //done stage('View Test Logs') {
stage('View Test Logs'){
steps { steps {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh '''#!/usr/bin/env bash sh """
ssh -o StrictHostKeyChecking=no root@${params.host_ip} << 'EOF' #!/usr/bin/env bash
ssh -o StrictHostKeyChecking=no root@${params.host_ip} << EOF
set -euo pipefail set -euo pipefail
# Loop while the screen session exists # Loop while the screen session exists
while screen -list | grep -q "ble_test_${TEST_HASH}"; do while screen -list | grep -q "ble_test_${TEST_HASH}"; do
@@ -94,8 +94,13 @@ pipeline {
echo "$line" echo "$line"
done done
done done
'EOF' EOF
''' """
}
}
}
}
//sh """ //sh """
//ssh -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF //ssh -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
@@ -108,11 +113,6 @@ pipeline {
// done // done
// done // done
//""" //"""
}
}
}
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Post-build cleanup - kill the remote screen session // Post-build cleanup - kill the remote screen session
// --------------------------------------------------------------------- // ---------------------------------------------------------------------