Bug 1247168 - Use robustcheckout in decision image; r=dustin
authorGregory Szorc <gps@mozilla.com>
Wed, 20 Jul 2016 12:10:52 -0700
changeset 346540 7450495f51828d454328f1af8c3bc575f36f6642
parent 346539 6c9ced9abf7eae19b05bf10420770dce0b20c045
child 346541 8b43386ca744eae3cef985bdfa2209d24cddce09
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1247168
milestone50.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 1247168 - Use robustcheckout in decision image; r=dustin Now that Mercurial 3.8.4 and robustcheckout are in place, we convert checkout-gecko from tc-vcs to robustcheckout. As part of this, we remove references to tc-vcs from the Docker image. This completes our changes to the decision Docker image. Image size has been reduced from ~725 MB to ~217 MB. Not bad. MozReview-Commit-ID: Hx9d02Al1TP
testing/docker/decision/bin/checkout-gecko
testing/docker/decision/system-setup.sh
--- a/testing/docker/decision/bin/checkout-gecko
+++ b/testing/docker/decision/bin/checkout-gecko
@@ -1,33 +1,31 @@
 #! /bin/bash -e
 
-set -e
+set -ex
 
 # Ensure we have at least enough to check gecko out...
 test $GECKO_BASE_REPOSITORY
 
-# Workspace to checkout gecko into...
-WORKSPACE=$1
-mkdir -p $WORKSPACE
+DESTDIR=$1
 
 res=`curl --fail --retry 5 http://taskcluster/secrets/v1/secret/project/taskcluster/gecko/hgfingerprint`
 FP=`echo $res | jq -r .secret.content`
 
 if [[ ! "$FP" =~ ^[a-f0-9:]+$ ]]; then
     echo
     echo "[taskcluster:error] HG host fingerprint not properly loaded"
     exit 1
 fi
 
-mkdir /etc/mercurial
-cat >/etc/mercurial/hgrc <<EOF
-[hostfingerprints]
-hg.mozilla.org = $FP
-EOF
+if [ -n "${GECKO_HEAD_REV}" ]; then
+  args="--revision ${GECKO_HEAD_REV}"
+else
+  args="--branch ${GECKO_HEAD_REF}"
+fi
 
-# Note that tc-vcs requires only the first two arguments so others are optional.
-# This is intended to make it easier to clone local directories.
-tc-vcs checkout $WORKSPACE/gecko \
-  $GECKO_BASE_REPOSITORY \
-  $GECKO_HEAD_REPOSITORY \
-  $GECKO_HEAD_REV \
-  $GECKO_HEAD_REF
+hg --config hostfingerprints.hg.mozilla.org=${FP} robustcheckout \
+  --sharebase /home/worker/hg-shared \
+  --purge \
+  ${args} \
+  --upstream ${GECKO_BASE_REPOSITORY} \
+  ${GECKO_HEAD_REPOSITORY} \
+  ${DESTDIR}
--- a/testing/docker/decision/system-setup.sh
+++ b/testing/docker/decision/system-setup.sh
@@ -70,30 +70,13 @@ refresh = 1.0
 cacerts = /etc/ssl/certs/ca-certificates.crt
 
 [extensions]
 robustcheckout = /usr/local/mercurial/robustcheckout.py
 EOF
 
 chmod 644 /etc/mercurial/hgrc
 
-# Install node
-tooltool_fetch <<'EOF'
-[
-{
-    "size": 5676610,
-    "digest": "ce27b788dfd141a5ba7674332825fc136fe2c4f49a319dd19b3a87c8fffa7a97d86cbb8535661c9a68c9122719aa969fc6a8c886458a0df9fc822eec99ed130b",
-    "algorithm": "sha512",
-    "filename": "node-v0.10.36-linux-x64.tar.gz"
-}
-]
-
-EOF
-tar -C /usr/local -xz --strip-components 1 < node-*.tar.gz
-node -v  # verify
-
-npm install -g taskcluster-vcs@2.3.34
-
 cd /
 rm -rf $BUILD
 apt-get clean
 apt-get autoclean
 rm $0