mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-13 08:59:54 +08:00
chore(sauce): use tunnel-identifier and ready-file only on Travis
When running locally, there's not TRAVIS_JOB_NUMBER env variable defined and it screws the Sauce Connect (it uses a tunnel with empty name), this makes it work locally without defining TRAVIS_JOB_NUMBER env variable. Also, if you run the sauce_connect_setup.sh locally, without having SAUCE_CONNECT_READY_FILE, it does not pass the `--ready-file` argument to avoid Sauce Connect blowing up.
This commit is contained in:
@@ -25,8 +25,17 @@ unzip $CONNECT_DOWNLOAD
|
||||
rm $CONNECT_DOWNLOAD
|
||||
|
||||
|
||||
|
||||
ARGS=""
|
||||
|
||||
# Set tunnel-id only on Travis, to make local testing easier.
|
||||
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
|
||||
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER"
|
||||
fi
|
||||
if [ ! -z "$SAUCE_CONNECT_READY_FILE" ]; then
|
||||
ARGS="$ARGS --readyfile $SAUCE_CONNECT_READY_FILE"
|
||||
fi
|
||||
|
||||
echo "Starting Sauce Connect in the background"
|
||||
echo "Logging into $CONNECT_LOG"
|
||||
java -jar Sauce-Connect.jar --readyfile $SAUCE_CONNECT_READY_FILE \
|
||||
--tunnel-identifier $TRAVIS_JOB_NUMBER \
|
||||
$SAUCE_USERNAME $SAUCE_ACCESS_KEY > $CONNECT_LOG &
|
||||
java -jar Sauce-Connect.jar $ARGS $SAUCE_USERNAME $SAUCE_ACCESS_KEY > $CONNECT_LOG &
|
||||
|
||||
Reference in New Issue
Block a user