build: increase saucelabs connect timeout (#14470)

* build: increase saucelabs connect timeout

At some point we went down from a 2min wait timeout to 30seconds because we re-ran the startup script if something failed. Since re-running didn't really help and we removed it, we should move the timeout back to a longer period.

e.g. see: https://circleci.com/gh/angular/material2/25254 where it successfully acquired a tunnel, but just didn't have enough time to actually establish it.

* Switch to rewritten saucelabs version

* Update to latest saucelabs launcher version
This commit is contained in:
Paul Gschwendtner
2018-12-14 01:53:16 +01:00
committed by vivian-hu
parent 4d42a90476
commit c460728225
5 changed files with 28 additions and 17 deletions
+2 -4
View File
@@ -6,7 +6,6 @@ tunnelFileName="sc-4.5.2-linux.tar.gz"
tunnelUrl="https://saucelabs.com/downloads/${tunnelFileName}"
tunnelTmpDir="/tmp/material-saucelabs"
tunnelLogFile="${tunnelTmpDir}/saucelabs-connect.log"
tunnelReadyFile="${tunnelTmpDir}/readyfile"
tunnelPidFile="${tunnelTmpDir}/pidfile"
@@ -34,7 +33,6 @@ if [ ! -z "${CIRCLE_BUILD_NUM}" ]; then
sauceArgs="${sauceArgs} --tunnel-identifier angular-material-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
fi
echo "Starting Sauce Connect in the background, logging into: ${tunnelLogFile}"
echo "Starting Sauce Connect in the background. Passed arguments: ${sauceArgs}"
sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} 2>&1 >> \
${tunnelLogFile} &
sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} &
+1 -10
View File
@@ -1,17 +1,9 @@
#!/bin/bash
tunnelTmpDir="/tmp/material-saucelabs"
tunnelLogFile="${tunnelTmpDir}/saucelabs-connect.log"
tunnelReadyFile="${tunnelTmpDir}/readyfile"
WAIT_DELAY=30
# Method that prints the logfile output of the saucelabs tunnel.
printLog() {
echo "Logfile output of Saucelabs tunnel (${tunnelLogFile}):"
echo ""
cat ${tunnelLogFile}
}
WAIT_DELAY=120
# Wait for Saucelabs Connect to be ready before exiting
# Time out if we wait for more than 2 minutes, so the process won't run forever.
@@ -25,7 +17,6 @@ while [ ! -f ${tunnelReadyFile} ]; do
if [ $counter -gt $[${WAIT_DELAY} * 2] ]; then
echo ""
echo "Timed out after 2 minutes waiting for tunnel ready file"
printLog
exit 5
fi