Yet another tweak to trying Sauce Connect twice
diff --git a/circle.yml b/circle.yml
index 934d387..a24789e 100644
--- a/circle.yml
+++ b/circle.yml
@@ -52,11 +52,15 @@
time tar -xzf sc-latest-linux.tar.gz
fi
# Sauce Connect randomly fails so try twice https://git.io/vPN8v
- time sc-*-linux/bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready
- test -e sauce_is_ready \
- || time sc-*-linux/bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready
- test -e sauce_is_ready \
- || echo 'ERROR: Exited twice without creating readyfile' | tee /dev/stderr > ~/sauce_is_ready
+ time sc-*-linux/bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY \
+ --readyfile ~/sauce_is_ready
+ test -e sauce_is_ready && exit
+ time sc-*-linux/bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY \
+ --readyfile ~/sauce_is_ready
+ test -e sauce_is_ready && exit
+ echo 'ERROR: Exited twice without creating readyfile' \
+ | tee /dev/stderr > ~/sauce_is_ready
+ exit 1
} >$CIRCLE_ARTIFACTS/sauce-connect.log 2>&1
:
background: true