ci: print sauce-connect log output on timeout (#29084)

Currently when `sauce-connect` times out after 2min, we just
print a message saying that the SauceLabs tunnel didn't establish
within 2min. In order to make debugging easier, we now print the
full log file output on failure.

PR Close #29084
This commit is contained in:
Paul Gschwendtner
2019-03-03 18:36:05 +01:00
committed by Andrew Kushnir
parent 842d615928
commit 43ce6ec84a
3 changed files with 9 additions and 1 deletions

View File

@ -13,8 +13,10 @@ while [[ ! -f ${SAUCE_READY_FILE} ]]; do
# Counter needs to be multiplied by two because the while loop only sleeps a half second.
# This has been made in favor of better progress logging (printing dots every half second)
if [ $counter -gt $[${SAUCE_READY_FILE_TIMEOUT} * 2] ]; then
echo "Timed out after ${SAUCE_READY_FILE_TIMEOUT} seconds waiting for tunnel ready file."
echo "Printing logfile output:"
echo ""
echo "Timed out after ${SAUCE_READY_FILE_TIMEOUT} seconds waiting for tunnel ready file"
cat ${SAUCE_LOG_FILE}
exit 5
fi