jenkinsfile - watch screen test adding kill subroutine init
This commit is contained in:
1 parent
1a8dea0cdc
commit
6e32e99d83
1 file changed
+20
-2
@@ -77,7 +77,25 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Log Tail Termination Subroutine'){
|
||||||
|
steps {
|
||||||
|
sshagent([env.SSH_CREDENTIALS_ID]) {
|
||||||
|
sh """
|
||||||
|
ssh -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
|
||||||
|
(
|
||||||
|
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
|
||||||
|
) &
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//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
|
||||||
@@ -123,4 +141,4 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user