Skip to content

Commit 49ee886

Browse files
committed
ci: only download saucelabs connect utility when running tests
The saucelabs connect tunnel utility is now only downloaded when a saucelabs related test is executed. Previously it was part of the root `package.json` and downloaded whenever a package install was executed. The utility archive was also not an actual package which incidentally worked with npm but does not work with newer versions of yarn. A SHA256 check is also now performed prior to executing the utility to verify the expected file is present.
1 parent f102f81 commit 49ee886

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@
184184
"rxjs": "7.8.1",
185185
"sass": "1.77.4",
186186
"sass-loader": "14.2.1",
187-
"sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz",
188187
"semver": "7.6.2",
189188
"shelljs": "^0.8.5",
190189
"source-map": "0.7.4",

scripts/saucelabs/start-tunnel.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
set -x -u -e -o pipefail
44

55
readonly currentDir=$(cd $(dirname $0); pwd)
6+
readonly connectVersion="sc-4.9.2-linux"
7+
readonly connectHash="2f8a3f87e1da4dc9a41bc45ec7c3a2ecdba4c72d72b7d0193f04ad66c5809104"
8+
9+
echo "Downloading Sauce Connect"
10+
11+
curl https://saucelabs.com/downloads/${connectVersion}.tar.gz -o ${currentDir}/${connectVersion}.tar.gz
12+
echo "${connectHash} ${currentDir}/${connectVersion}.tar.gz" | shasum -a 256 -c
13+
tar -xzf ${currentDir}/${connectVersion}.tar.gz -C ${currentDir}
614

715
# Command arguments that will be passed to sauce-connect. By default we disable SSL bumping for
816
# all requests. This is because SSL bumping is not needed for our test setup and in order
@@ -29,4 +37,4 @@ fi
2937

3038
echo "Starting Sauce Connect. Passed arguments: ${sauceArgs}"
3139

32-
${currentDir}/../../node_modules/sauce-connect-proxy/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs}
40+
${currentDir}/${connectVersion}/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs}

yarn.lock

-4
Original file line numberDiff line numberDiff line change
@@ -12483,10 +12483,6 @@ [email protected], sass@^1.69.5:
1248312483
immutable "^4.0.0"
1248412484
source-map-js ">=0.6.2 <2.0.0"
1248512485

12486-
"sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz":
12487-
version "0.0.0"
12488-
resolved "https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz#9310bc860f7870a1f872b11c4dc6073a1ad34e5e"
12489-
1249012486
saucelabs@^1.5.0:
1249112487
version "1.5.0"
1249212488
resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.5.0.tgz#9405a73c360d449b232839919a86c396d379fd9d"

0 commit comments

Comments
 (0)