From 6fd0cdeee617061735fca3ae0237daae8dc6fd68 Mon Sep 17 00:00:00 2001 From: matt Date: Sun, 18 Oct 2026 03:28:55 -0700 Subject: [PATCH] jenkinsfile - watch screen test intern refinement on kill loop --- api/Jenkinsfile.ble_test | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/api/Jenkinsfile.ble_test b/api/Jenkinsfile.ble_test index 1b320da..bb2dbaa 100644 --- a/api/Jenkinsfile.ble_test +++ b/api/Jenkinsfile.ble_test @@ -80,20 +80,22 @@ pipeline { stage('Log Tail Termination Subroutine'){ steps { - sshagent([env.SSH_CREDENTIALS_ID]) { + sshagent([env.SSH_CREDENTIALS_ID]) { sh """ - ssh -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF - echo Running background termination loop I hope... - ( - sleep 10 - while pgrep -f "tail.*ble_test_${env.TEST_HASH}" > /dev/null; do - if ! screen -list | grep -q ble_test_${env.TEST_HASH}; then - pkill -9 -f "tail.*ble_test_${env.TEST_HASH}" - fi - echo Hello from in the loop - sleep 5 - done - ) & + ssh -o StrictHostKeyChecking=no root@${params.host_ip} \ + -o ServerAliveInterval=60 -o ServerAliveCountMax=120 \ + << 'EOF' + echo Running background termination loop I hope... + nohup sh -c ' + sleep 10 + while pgrep -f "tail.*ble_test_${env.TEST_HASH}" > /dev/null; do + if ! screen -list | grep -q ble_test_${env.TEST_HASH}; then + pkill -9 -f "tail.*ble_test_${env.TEST_HASH}" + fi + sleep 5 + done + ' & + EOF """ } }