jenkinsfile - watch screen test 1

This commit is contained in:
matt committed 2026-10-18 00:12:52 -07:00
1 parent 5e660b04de
commit 95f3252318
1 file changed
+4 -5
+4 -5
View File
@@ -7,7 +7,6 @@ pipeline {
environment { environment {
DEBIAN_IP = 'debian_machine_ip' DEBIAN_IP = 'debian_machine_ip'
SSH_CREDENTIALS_ID = 'jenkins_root_ssh' SSH_CREDENTIALS_ID = 'jenkins_root_ssh'
REMOTE_SCRIPT = '/opt/ble-test/ble_api/api/ble.py'
} }
// ------------------------------------------------------------------ // ------------------------------------------------------------------
@@ -65,7 +64,7 @@ pipeline {
stage('Run BLE Test') { stage('Run BLE Test') {
steps { steps {
retry(3) { // 3× retry on transient SSH hiccups retry(3) { // 3× retry on transient SSH hiccups
timeout(time: 8, unit: 'HOURS') { // 8‑hour hard timeout timeout(time: 5, unit: 'MINUTES') { // 5-minute hard timeout
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
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
@@ -76,10 +75,10 @@ pipeline {
cd /opt/ble-test/ble_api cd /opt/ble-test/ble_api
git pull git pull
cd /opt/ble-test/ble_api/api cd /opt/ble-test/ble_api/api
python3 -u ${REMOTE_SCRIPT} ${params.test_count} python3 -u ./ble.py ${params.test_count}
' '
# Give screen a moment to spin up echo "=== Live test output ==="
sleep 2 tail -f ~/screen/S.${env.SCREEN_SESSION}
""" """
} }
} }