jenkinsfile - add q flag to ssh

This commit is contained in:
matt committed 2026-10-19 02:27:23 -07:00
1 parent 5a9b26556a
commit a07c831388
1 file changed
+5 -5
+5 -5
View File
@@ -48,7 +48,7 @@ pipeline {
steps { steps {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh """ sh """
ssh -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
if ! command -v screen > /dev/null; then if ! command -v screen > /dev/null; then
echo "screen not found - installing" echo "screen not found - installing"
apt-get update && apt-get install -y screen apt-get update && apt-get install -y screen
@@ -65,7 +65,7 @@ pipeline {
steps { steps {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh """ sh """
ssh -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
sleep 5 sleep 5
cd /opt/ble-test/ble_api cd /opt/ble-test/ble_api
git pull git pull
@@ -81,7 +81,7 @@ pipeline {
steps { steps {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh """ sh """
ssh -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 === Initiating Tail Watchdog === echo === Initiating Tail Watchdog ===
screen -dmS ble_test_watchdog_${env.TEST_HASH} sh -c ' screen -dmS ble_test_watchdog_${env.TEST_HASH} sh -c '
while ! pgrep -f "tail.*ble_test_${env.TEST_HASH}" > /dev/null; do while ! pgrep -f "tail.*ble_test_${env.TEST_HASH}" > /dev/null; do
@@ -105,7 +105,7 @@ pipeline {
steps { steps {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh """ sh """
ssh -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
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
@@ -124,7 +124,7 @@ pipeline {
always { always {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh """ sh """
ssh -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
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