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 {
DEBIAN_IP = 'debian_machine_ip'
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') {
steps {
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]) {
sh """
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
git pull
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
sleep 2
echo "=== Live test output ==="
tail -f ~/screen/S.${env.SCREEN_SESSION}
"""
}
}