gecko-dev/taskcluster/scripts/misc/tooltool-download.sh
Wander Lairson Costa 6332ed5b0a Bug 1338651 part 1: Change docker image home dir to /build. r=dustin,mshal
Using /home/worker is the build directory has a 30% talos performance
loss, because test machines has a /home mount directory.

MozReview-Commit-ID: 554IPMRWgzK

--HG--
extra : rebase_source : 00827d3f6bd705419bc801eb05b543af1ddc274f
2017-08-28 08:44:51 -03:00

36 lines
1.0 KiB
Bash

# Fetch a tooltool manifest.
cd $WORKSPACE/build/src
case "`uname -s`" in
Linux)
TOOLTOOL_AUTH_FILE=/builds/relengapi.tok
;;
MINGW*)
TOOLTOOL_AUTH_FILE=c:/builds/relengapi.tok
;;
esac
TOOLTOOL_DL_FLAGS=
if [ -e "$TOOLTOOL_AUTH_FILE" ]; then
# When the worker has the relengapi token pass it down
TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --authentication-file=$TOOLTOOL_AUTH_FILE"
fi
if [ -n "$RELENGAPI_PORT" ]; then
# When the worker has the relengapi proxy setup, use it.
TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --tooltool-url=http://relengapi/tooltool/"
fi
if [ -n "$UPLOAD_DIR" ]; then
TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --artifact-manifest $UPLOAD_DIR/toolchains.json"
fi
: TOOLTOOL_CACHE ${TOOLTOOL_CACHE:=/builds/worker/tooltool-cache}
export TOOLTOOL_CACHE
./mach artifact toolchain -v${TOOLTOOL_DL_FLAGS}${TOOLTOOL_MANIFEST:+ --tooltool-manifest "${TOOLTOOL_MANIFEST}"}${TOOLTOOL_CACHE:+ --cache-dir ${TOOLTOOL_CACHE}} --retry 5${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}}
cd $OLDPWD