Bug 1381770 - In tooltool-download.sh, automatically setup the relengapi authentication file. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 18 Jul 2017 16:13:26 +0900
changeset 418474 66bb1f3a35f9dd8f97a7214b6b3227ce6ed8909e
parent 418473 ba2a0e45421b97a2111458a4a79719b52ad17124
child 418475 a2ae5410cfd3ba2bcdd027fa51a31ac9f769f47b
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1381770
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1381770 - In tooltool-download.sh, automatically setup the relengapi authentication file. r=mshal
taskcluster/scripts/misc/tooltool-download.sh
--- a/taskcluster/scripts/misc/tooltool-download.sh
+++ b/taskcluster/scripts/misc/tooltool-download.sh
@@ -1,14 +1,28 @@
 # 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
 
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
 export TOOLTOOL_CACHE