jenkinsfile - move print statements around
This commit is contained in:
1 parent
9eb8fd93c0
commit
c0d60ba0ac
1 file changed
+5
-4
@@ -36,10 +36,11 @@ pipeline {
|
|||||||
env.TEST_HASH =
|
env.TEST_HASH =
|
||||||
"${String.format('%06d', epochSec % 1_000_000)}"
|
"${String.format('%06d', epochSec % 1_000_000)}"
|
||||||
|
|
||||||
|
echo "==MC== Test Hash - ${env.TEST_HASH}"
|
||||||
|
echo "==MC== Disabling MOTD..."
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
cd /tmp
|
cd /tmp
|
||||||
echo ==MC== Test Hash - ${env.TEST_HASH}
|
|
||||||
echo ==MC== Disabling MOTD...
|
|
||||||
touch .hushlogin
|
touch .hushlogin
|
||||||
scp -i /root/.ssh/id_rsa .hushlogin root@${params.host_ip}:/root/.hushlogin
|
scp -i /root/.ssh/id_rsa .hushlogin root@${params.host_ip}:/root/.hushlogin
|
||||||
rm .hushlogin
|
rm .hushlogin
|
||||||
@@ -117,8 +118,8 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sshagent([env.SSH_CREDENTIALS_ID]) {
|
sshagent([env.SSH_CREDENTIALS_ID]) {
|
||||||
sh """
|
sh """
|
||||||
echo ==MC== Test is running, monitoring output.
|
|
||||||
ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
|
ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
|
||||||
|
echo ==MC== Test is running, monitoring output.
|
||||||
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 || true
|
tail -f /tmp/ble_test_${env.TEST_HASH}.log || true
|
||||||
done
|
done
|
||||||
@@ -137,8 +138,8 @@ pipeline {
|
|||||||
always {
|
always {
|
||||||
sshagent([env.SSH_CREDENTIALS_ID]) {
|
sshagent([env.SSH_CREDENTIALS_ID]) {
|
||||||
sh """
|
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
|
ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
|
||||||
|
echo ==MC== Test complete, cleaning up Screen sessions
|
||||||
screen -wipe
|
screen -wipe
|
||||||
if screen -list | grep -q ${env.TEST_HASH}; then
|
if screen -list | grep -q ${env.TEST_HASH}; then
|
||||||
screen -S ble_test_watchdog_${env.TEST_HASH} -X quit
|
screen -S ble_test_watchdog_${env.TEST_HASH} -X quit
|
||||||
|
|||||||
Reference in new issue
Block a user