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.
--- 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',