jenkinsfile - add some echos, ble is ready to test
This commit is contained in:
1 parent
a1e050c688
commit
2b4b33701e
1 file changed
+6
-3
@@ -42,7 +42,7 @@ pipeline {
|
||||
echo ==MC== Disabling MOTD...
|
||||
touch .hushlogin
|
||||
scp .hushlogin root@${params.host_ip}:/root/.hushlogin
|
||||
|
||||
rm .hushlogin
|
||||
"""
|
||||
|
||||
}
|
||||
@@ -50,7 +50,7 @@ pipeline {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 2. Ensure screen is installed (runs only once)
|
||||
// 2. Ensure screen is installed
|
||||
// ---------------------------------------------------------------------
|
||||
stage('Ensure screen is present') {
|
||||
steps {
|
||||
@@ -82,7 +82,7 @@ pipeline {
|
||||
git pull
|
||||
cd /opt/ble-test/ble_api/api
|
||||
screen -dmS ble_test_${env.TEST_HASH} bash -c "cd /opt/ble-test/ble_api/api && python3 -u ./ble.py ${params.test_count} | tee /tmp/ble_test_${env.TEST_HASH}.log"
|
||||
|
||||
echo ==MC== BLE Test running...
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -117,6 +117,7 @@ pipeline {
|
||||
steps {
|
||||
sshagent([env.SSH_CREDENTIALS_ID]) {
|
||||
sh """
|
||||
echo ==MC== Test is running, monitoring output.
|
||||
ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
|
||||
while screen -list | grep -q ble_test_${env.TEST_HASH}; do
|
||||
tail -f /tmp/ble_test_${env.TEST_HASH}.log || true
|
||||
@@ -136,6 +137,7 @@ pipeline {
|
||||
always {
|
||||
sshagent([env.SSH_CREDENTIALS_ID]) {
|
||||
sh """
|
||||
echo ==MC== Test complete, cleaning up Screen sessions
|
||||
ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
|
||||
screen -wipe
|
||||
if screen -list | grep -q ${env.TEST_HASH}; then
|
||||
@@ -143,6 +145,7 @@ pipeline {
|
||||
screen -S ble_test_${env.TEST_HASH} -X quit
|
||||
fi
|
||||
rm /tmp/ble_test_${env.TEST_HASH}.log
|
||||
rm /root/.hushlogin
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user