Bug 1509962: [update-verify] Use taskgraph fetches in update-verify; r=mtabara
authorTom Prince <mozilla@hocat.ca>
Mon, 03 Dec 2018 06:44:55 +0000
changeset 508413 a73e91a77409762488958bf3b9430a2bec80c59c
parent 508412 dd003a5330b7ed468571c94dfdcceb44fd3f9e56
child 508427 01d0813d8203d78613fc33a3e8e32627c1300b50
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtabara
bugs1509962
milestone65.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 1509962: [update-verify] Use taskgraph fetches in update-verify; r=mtabara Differential Revision: https://phabricator.services.mozilla.com/D12981
taskcluster/docker/update-verify/Dockerfile
taskcluster/taskgraph/transforms/update_verify.py
tools/update-verify/scripts/chunked-verify.sh
--- a/taskcluster/docker/update-verify/Dockerfile
+++ b/taskcluster/docker/update-verify/Dockerfile
@@ -31,17 +31,20 @@ COPY topsrcdir/taskcluster/docker/recipe
 
 # %include taskcluster/docker/recipes/install-mercurial.sh
 ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /build/install-mercurial.sh
 ADD system-setup.sh /tmp/system-setup.sh
 RUN bash /tmp/system-setup.sh
 
 # %include taskcluster/scripts/run-task
 ADD topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/misc/fetch-content
+ADD topsrcdir/taskcluster/scripts/misc/fetch-content /builds/worker/bin/fetch-content
 RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/*
+ENV PATH $PATH:/builds/worker/bin
 
 # Set variable normally configured at login, by the shells parent process, these
 # are taken from GNU su manual
 ENV           HOME          /builds/worker
 ENV           SHELL         /bin/bash
 ENV           USER          worker
 ENV           LOGNAME       worker
 ENV           HOSTNAME      taskcluster-worker
--- a/taskcluster/taskgraph/transforms/update_verify.py
+++ b/taskcluster/taskgraph/transforms/update_verify.py
@@ -6,17 +6,16 @@ Transform the beetmover task into an act
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from copy import deepcopy
 
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.util.schema import resolve_keyed_by
-from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix
 from taskgraph.util.treeherder import add_suffix
 
 transforms = TransformSequence()
 
 
 @transforms.add
 def add_command(config, tasks):
     for task in tasks:
@@ -46,22 +45,18 @@ def add_command(config, tasks):
                 resolve_keyed_by(
                     chunked, thing, thing,
                     **{
                         'project': config.params['project'],
                         'release-type': config.params['release_type'],
                     }
                 )
 
-            update_verify_config = None
             for upstream in chunked.get("dependencies", {}).keys():
                 if 'update-verify-config' in upstream:
-                    update_verify_config = "{}update-verify.cfg".format(
-                        get_taskcluster_artifact_prefix(task, "<{}>".format(upstream))
-                    )
-            if not update_verify_config:
+                    chunked.setdefault('fetches', {})[upstream] = [
+                        "update-verify.cfg",
+                    ]
+                    break
+            else:
                 raise Exception("Couldn't find upate verify config")
 
-            chunked["worker"]["env"]["TASKCLUSTER_VERIFY_CONFIG"] = {
-                "task-reference": update_verify_config
-            }
-
             yield chunked
--- a/tools/update-verify/scripts/chunked-verify.sh
+++ b/tools/update-verify/scripts/chunked-verify.sh
@@ -7,23 +7,17 @@ pushd `dirname $0` &>/dev/null
 MY_DIR=$(pwd)
 popd &>/dev/null
 SCRIPTS_DIR="$MY_DIR/.."
 PYTHON='./mach python'
 
 chunks=$1
 thisChunk=$2
 
-if [ -n "$TASKCLUSTER_VERIFY_CONFIG" ]; then
-    wget -O "$SCRIPTS_DIR/release/updates/update-verify.cfg" "$TASKCLUSTER_VERIFY_CONFIG"
-    VERIFY_CONFIG="update-verify.cfg"
-else
-    echo "Unable to run without TASKCLUSTER_VERIFY_CONFIG."
-    exit 1
-fi
+VERIFY_CONFIG="$MOZ_FETCHES_DIR/update-verify.cfg"
 
 # release promotion
 if [ -n "$CHANNEL" ]; then
   EXTRA_PARAMS="--verify-channel $CHANNEL"
 else
   EXTRA_PARAMS=""
 fi
 $PYTHON $MY_DIR/chunked-verify.py --chunks $chunks --this-chunk $thisChunk \