Bug 1356952 - Use environment variable to define tooltool manifest in hazard builds. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 06 Jun 2017 16:20:09 +0900
changeset 410994 0376305933bfabd58b1dcec0dcc140f8e4a3b1bb
parent 410993 bde62d05afec2fa3d510369c367676af44cfd0a3
child 410995 3d6e3b030c4f6ef11869b643f1be5c52145f0ef9
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1356952
milestone55.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 1356952 - Use environment variable to define tooltool manifest in hazard builds. r=mshal Hazard jobs use a specific tooltool-manifest field in their definition. Since there is no post-processing happening on those definitions, and since generalizing it would require adding the field to a bunch of validation schemas, and the same code to various transforms, it's just simpler to move to use environment variable definitions here too. Eventually, tooltool manifests won't be necessary anyways, and those environment variables will go away.
taskcluster/ci/hazard/kind.yml
taskcluster/scripts/builder/build-haz-linux.sh
taskcluster/taskgraph/transforms/job/hazard.py
--- a/taskcluster/ci/hazard/kind.yml
+++ b/taskcluster/ci/hazard/kind.yml
@@ -22,34 +22,38 @@ jobs:
     linux64-shell-haz/debug:
         description: "JS Shell Hazard Analysis Linux"
         index:
             product: firefox
             job-name: shell-haz-debug
         treeherder:
             platform: linux64/debug
             symbol: SM-tc(H)
+        worker:
+            env:
+                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/hazard.manifest"
         run:
             using: hazard
-            tooltool-manifest: "browser/config/tooltool-manifests/linux64/hazard.manifest"
             command: >
                 cd /home/worker/checkouts/gecko/taskcluster/scripts/builder
                 && ./build-haz-linux.sh --project shell $HOME/workspace
         when:
             files-changed:
                 - js/public/**
                 - js/src/**
 
     linux64-haz/debug:
         description: "Browser Hazard Analysis Linux"
         index:
             product: firefox
             job-name: browser-haz-debug
         treeherder:
             platform: linux64/debug
             symbol: tc(H)
+        worker:
+            env:
+                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/hazard.manifest"
         run:
             using: hazard
-            tooltool-manifest: "browser/config/tooltool-manifests/linux64/hazard.manifest"
             mozconfig: "browser/config/mozconfigs/linux64/hazards"
             command: >
                 cd /home/worker/checkouts/gecko/taskcluster/scripts/builder
                 && ./build-haz-linux.sh --project browser $HOME/workspace
--- a/taskcluster/scripts/builder/build-haz-linux.sh
+++ b/taskcluster/scripts/builder/build-haz-linux.sh
@@ -32,17 +32,16 @@ SCRIPT_FLAGS="$@"
 # Ensure all the scripts in this dir are on the path....
 DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 PATH=$DIRNAME:$PATH
 
 # Use GECKO_BASE_REPOSITORY as a signal for whether we are running in automation.
 export AUTOMATION=${GECKO_BASE_REPOSITORY:+1}
 
 : ${GECKO_DIR:=$WORKSPACE/gecko}
-: ${TOOLTOOL_MANIFEST:=browser/config/tooltool-manifests/linux64/hazard.manifest}
 : ${TOOLTOOL_CACHE:=$WORKSPACE/tt-cache}
 
 if ! [ -d $GECKO_DIR ]; then
     echo "GECKO_DIR must be set to a directory containing a gecko source checkout" >&2
     exit 1
 fi
 GECKO_DIR=$( cd "$GECKO_DIR" && pwd )
 
--- a/taskcluster/taskgraph/transforms/job/hazard.py
+++ b/taskcluster/taskgraph/transforms/job/hazard.py
@@ -19,19 +19,16 @@ from taskgraph.transforms.job.common imp
 )
 
 haz_run_schema = Schema({
     Required('using'): 'hazard',
 
     # The command to run within the task image (passed through to the worker)
     Required('command'): basestring,
 
-    # The tooltool manifest to use; default in the script is used if omitted
-    Optional('tooltool-manifest'): basestring,
-
     # The mozconfig to use; default in the script is used if omitted
     Optional('mozconfig'): basestring,
 
     # The set of secret names to which the task has access; these are prefixed
     # with `project/releng/gecko/{treeherder.kind}/level-{level}/`.   Setting
     # this will enable any worker features required and set the task's scopes
     # appropriately.  `true` here means ['*'], all secrets.  Not supported on
     # Windows
@@ -54,18 +51,16 @@ def docker_worker_hazard(config, job, ta
 
     env = worker['env']
     env.update({
         'MOZ_BUILD_DATE': config.params['moz_build_date'],
         'MOZ_SCM_LEVEL': config.params['level'],
     })
 
     # script parameters
-    if run.get('tooltool-manifest'):
-        env['TOOLTOOL_MANIFEST'] = run['tooltool-manifest']
     if run.get('mozconfig'):
         env['MOZCONFIG'] = run['mozconfig']
 
     # tooltool downloads
     worker['caches'].append({
         'type': 'persistent',
         'name': 'tooltool-cache',
         'mount-point': '/home/worker/tooltool-cache',