Pass Sauce tunnel identifier correctly

This commit is contained in:
Steve Gravrock
2021-04-17 15:59:57 -07:00
parent d6fa9dd1a0
commit 9555cb9842
3 changed files with 7 additions and 7 deletions

View File

@@ -61,9 +61,6 @@ jobs:
environment:
JASMINE_LONG_PROPERTY_TESTS: y
# Warning: Currently this is very flaky if anything else is using Sauce
# at the same time, possibly because we're not specifying the tunnel ID
# correctly. Probably not a good idea to run it from anything but a nightly.
test_browsers:
executor: node14
steps:
@@ -85,6 +82,7 @@ jobs:
# cleanly if we kill it from a different step than it started in.
export PATH=$PATH:$HOME/workspace/bin
export SAUCE_TUNNEL_IDENTIFIER=$CIRCLE_BUILD_NUM
scripts/start-sauce-connect sauce-pidfile
set +o errexit
scripts/run-all-browsers

View File

@@ -15,7 +15,11 @@ fi
outfile=`mktemp`
echo "Starting Sauce Connect"
sc -u "$SAUCE_USERNAME" -k "$SAUCE_ACCESS_KEY" -X 4445 --pidfile "$pidfile" 2>&1 | tee "$outfile" &
if [ -z "$SAUCE_TUNNEL_IDENTIFIER" ]; then
sc -u "$SAUCE_USERNAME" -k "$SAUCE_ACCESS_KEY" -X 4445 --pidfile "$pidfile" 2>&1 | tee "$outfile" &
else
sc -u "$SAUCE_USERNAME" -k "$SAUCE_ACCESS_KEY" -X 4445 --pidfile "$pidfile" -i "$SAUCE_TUNNEL_IDENTIFIER" 2>&1 | tee "$outfile" &
fi
while ! fgrep "Sauce Connect is up, you may start your tests." "$outfile" > /dev/null; do
sleep 1

View File

@@ -42,9 +42,7 @@ module.exports = {
browserVersion: process.env.SAUCE_BROWSER_VERSION,
build: `Core ${process.env.TRAVIS_BUILD_NUMBER || 'Ran locally'}`,
tags: ['Jasmine-Core'],
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
? process.env.TRAVIS_JOB_NUMBER.toString()
: null,
tunnelIdentifier: process.env.SAUCE_TUNNEL_IDENTIFIER,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY
}