jenkinsfile - watch screen test 7d new ssh method
This commit is contained in:
1 parent
55cd88d9dc
commit
59a7717be8
1 file changed
+8
-9
@@ -85,16 +85,15 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sshagent([env.SSH_CREDENTIALS_ID]) {
|
sshagent([env.SSH_CREDENTIALS_ID]) {
|
||||||
sh '''#!/usr/bin/env bash
|
sh '''#!/usr/bin/env bash
|
||||||
ssh -o StrictHostKeyChecking=no root@${params.host_ip} << 'EOF'
|
ssh -o StrictHostKeyChecking=no root@${params.host_ip} << EOF
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# Loop while the screen session exists
|
# Loop while the screen session exists
|
||||||
while screen -list | grep -q "ble_test_${TEST_HASH}"; do
|
while screen -list | grep -q "ble_test_${TEST_HASH}"; do
|
||||||
# Tail the file and flush each line immediately
|
# Tail the file and flush each line immediately
|
||||||
tail -n +1 -f "/tmp/ble_test_${env.TEST_HASH}.log" | while IFS= read -r line; do
|
tail -n +1 -f "/tmp/ble_test_${env.TEST_HASH}.log" | while IFS= read -r line; do
|
||||||
echo "$line"
|
echo "$line"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
|
||||||
EOF
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
//sh """
|
//sh """
|
||||||
|
|||||||
Reference in new issue
Block a user