Bug 1356952 - Use environment variable to define tooltool manifest in spidermonkey builds. r?mshal draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 06 Jun 2017 16:55:28 +0900
changeset 590600 80662d936bd45b8d7469606c0aac5b77bf5d2288
parent 590599 154079430c158e65247da0a6eacae766e417a508
child 590601 774c8d176a78ab7be38864275c6160bf124c3689
push id62794
push userbmo:mh+mozilla@glandium.org
push dateWed, 07 Jun 2017 22:26:49 +0000
reviewersmshal
bugs1356952
milestone55.0a1
Bug 1356952 - Use environment variable to define tooltool manifest in spidermonkey builds. r?mshal Like hazard jobs.
taskcluster/ci/spidermonkey/kind.yml
taskcluster/scripts/builder/sm-tooltool-config.sh
taskcluster/taskgraph/transforms/job/spidermonkey.py
--- a/taskcluster/ci/spidermonkey/kind.yml
+++ b/taskcluster/ci/spidermonkey/kind.yml
@@ -15,16 +15,18 @@ job-defaults:
         kind: build
         tier: 1
     index:
         product: firefox
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 36000
         docker-image: {in-tree: desktop-build}
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
     run:
         using: spidermonkey
     when:
         files-changed:
             # any when.files-changed specified below in a job will be
             # appended to this list
             - build/**
             - config/**
@@ -100,16 +102,19 @@ jobs:
 
     sm-arm-sim/debug:
         description: "Spidermonkey ARM sim"
         index:
             job-name: sm-arm-sim-debug
         treeherder:
             platform: linux32/debug
             symbol: SM-tc(arm)
+        worker:
+            env:
+                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux32/releng.manifest"
         run:
             spidermonkey-variant: arm-sim
 
     sm-arm64-sim/debug:
         description: "Spidermonkey ARM64 sim"
         index:
             job-name: sm-arm64-sim-debug
         treeherder:
@@ -119,19 +124,21 @@ jobs:
             spidermonkey-variant: arm64-sim
 
     sm-asan/opt:
         description: "Spidermonkey Address Sanitizer"
         index:
             job-name: sm-asan-opt
         treeherder:
             symbol: SM-tc(asan)
+        worker:
+            env:
+                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/asan.manifest"
         run:
             spidermonkey-variant: asan
-            tooltool-manifest: browser/config/tooltool-manifests/linux64/asan.manifest
 
     sm-compacting/debug:
         description: "Spidermonkey Compacting"
         index:
             job-name: sm-compacting-debug
         treeherder:
             platform: linux64/debug
             symbol: SM-tc(cgc)
@@ -139,30 +146,34 @@ jobs:
             spidermonkey-variant: compacting
 
     sm-msan/opt:
         description: "Spidermonkey Memory Sanitizer"
         index:
             job-name: sm-msan-opt
         treeherder:
             symbol: SM-tc(msan)
+        worker:
+            env:
+                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/msan.manifest"
         run:
             spidermonkey-variant: msan
-            tooltool-manifest: browser/config/tooltool-manifests/linux64/msan.manifest
 
     sm-tsan/opt:
         description: "Spidermonkey Thread Sanitizer"
         index:
             job-name: sm-tsan-opt
         treeherder:
             symbol: SM-tc(tsan)
             tier: 3
+        worker:
+            env:
+                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/tsan.manifest"
         run:
             spidermonkey-variant: tsan
-            tooltool-manifest: browser/config/tooltool-manifests/linux64/tsan.manifest
 
     sm-rootanalysis/debug:
         description: "Spidermonkey Root Analysis"
         index:
             job-name: sm-rootanalysis-debug
         treeherder:
             platform: linux64/debug
             symbol: SM-tc(r)
--- a/taskcluster/scripts/builder/sm-tooltool-config.sh
+++ b/taskcluster/scripts/builder/sm-tooltool-config.sh
@@ -37,14 +37,13 @@ case "$OSTYPE" in
         PLATFORM_OS=linux
         ;;
 esac
 
 # Install everything needed for the browser on this platform. Not all of it is
 # necessary for the JS shell, but it's less duplication to share tooltool
 # manifests.
 BROWSER_PLATFORM=$PLATFORM_OS$BITS
-: ${TOOLTOOL_MANIFEST:=browser/config/tooltool-manifests/$BROWSER_PLATFORM/releng.manifest}
 
 : ${TOOLTOOL_CHECKOUT:=$WORK}
 export TOOLTOOL_CHECKOUT
 
 (cd $TOOLTOOL_CHECKOUT && ${SRCDIR}/mach artifact toolchain -v --tooltool-url $TOOLTOOL_SERVER --tooltool-manifest $SRCDIR/$TOOLTOOL_MANIFEST ${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE})
--- a/taskcluster/taskgraph/transforms/job/spidermonkey.py
+++ b/taskcluster/taskgraph/transforms/job/spidermonkey.py
@@ -3,33 +3,29 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 """
 Support for running spidermonkey jobs via dedicated scripts
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from taskgraph.util.schema import Schema
-from voluptuous import Required, Optional, Any
+from voluptuous import Required, Any
 
 from taskgraph.transforms.job import run_job_using
 from taskgraph.transforms.job.common import (
     docker_worker_add_public_artifacts,
     support_vcs_checkout,
 )
 
 sm_run_schema = Schema({
     Required('using'): Any('spidermonkey', 'spidermonkey-package', 'spidermonkey-mozjs-crate'),
 
     # The SPIDERMONKEY_VARIANT
     Required('spidermonkey-variant'): basestring,
-
-    # The tooltool manifest to use; default from sm-tooltool-config.sh  is used
-    # if omitted
-    Optional('tooltool-manifest'): basestring,
 })
 
 
 @run_job_using("docker-worker", "spidermonkey", schema=sm_run_schema)
 @run_job_using("docker-worker", "spidermonkey-package", schema=sm_run_schema)
 @run_job_using("docker-worker", "spidermonkey-mozjs-crate",
                schema=sm_run_schema)
 def docker_worker_spidermonkey(config, job, taskdesc):
@@ -60,18 +56,16 @@ def docker_worker_spidermonkey(config, j
     # tooltool downloads; note that this script downloads using the API
     # endpoiint directly, rather than via relengapi-proxy
     worker['caches'].append({
         'type': 'persistent',
         'name': 'tooltool-cache',
         'mount-point': '/home/worker/tooltool-cache',
     })
     env['TOOLTOOL_CACHE'] = '/home/worker/tooltool-cache'
-    if run.get('tooltool-manifest'):
-        env['TOOLTOOL_MANIFEST'] = run['tooltool-manifest']
 
     support_vcs_checkout(config, job, taskdesc)
 
     script = "build-sm.sh"
     if run['using'] == 'spidermonkey-package':
         script = "build-sm-package.sh"
     elif run['using'] == 'spidermonkey-mozjs-crate':
         script = "build-sm-mozjs-crate.sh"