Bug 1595368: [firefox-ci] Use internal tooltool downloads for windows spidermonkey tasks; draft
authorTom Prince <mozilla@hocat.ca>
Sun, 10 Nov 2019 19:56:46 -0700
changeset 2424713 2ecfb9c3d93d788a5f607b1eb517bed43fe72bbd
parent 2424494 72c52c0101cfd102b207224646c3007d6872e65c
child 2424714 ce044a373790f9f7fef90e3e36e191dc01b1a813
push id447525
push usermozilla@hocat.ca
push dateMon, 11 Nov 2019 06:20:53 +0000
treeherdertry@887102da46f1 [default view] [failures only]
bugs1595368
milestone72.0a1
Bug 1595368: [firefox-ci] Use internal tooltool downloads for windows spidermonkey tasks; Differential Revision: https://phabricator.services.mozilla.com/D52497
taskcluster/ci/spidermonkey/linux.yml
taskcluster/ci/spidermonkey/windows.yml
taskcluster/taskgraph/transforms/job/spidermonkey.py
--- a/taskcluster/ci/spidermonkey/linux.yml
+++ b/taskcluster/ci/spidermonkey/linux.yml
@@ -3,16 +3,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 job-defaults:
     worker:
         max-run-time: 36000
         docker-image: {in-tree: debian7-amd64-build}
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/jsshell.manifest"
+    run:
+        tooltool-downloads: public
 
 sm-package-linux64/opt:
     description: "Spidermonkey source package and test"
     index:
         job-name: sm-package-linux64-opt
     treeherder:
         symbol: SM(pkg)
         platform: linux64/opt
--- a/taskcluster/ci/spidermonkey/windows.yml
+++ b/taskcluster/ci/spidermonkey/windows.yml
@@ -3,16 +3,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 job-defaults:
     worker-type: b-win2012
     worker:
         max-run-time: 36000
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
+    run:
+        tooltool-downloads: internal
 
 sm-plain-win64/debug:
     description: "Spidermonkey Plain win64 debug"
     index:
         job-name: sm-plain-win64-debug
     treeherder:
         platform: windows2012-64/debug
         symbol: SM(p)
--- a/taskcluster/taskgraph/transforms/job/spidermonkey.py
+++ b/taskcluster/taskgraph/transforms/job/spidermonkey.py
@@ -25,16 +25,22 @@ sm_run_schema = Schema({
                            'spidermonkey-rust-bindings'),
 
     # SPIDERMONKEY_VARIANT and SPIDERMONKEY_PLATFORM
     Required('spidermonkey-variant'): basestring,
     Optional('spidermonkey-platform'): basestring,
 
     # Base work directory used to set up the task.
     Required('workdir'): basestring,
+
+    Required('tooltool-downloads'): Any(
+        False,
+        'public',
+        'internal',
+    ),
 })
 
 
 @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)
 @run_job_using("docker-worker", "spidermonkey-rust-bindings",
@@ -47,17 +53,19 @@ def docker_worker_spidermonkey(config, j
     worker.setdefault('caches', []).append({
         'type': 'persistent',
         'name': '{}-build-spidermonkey-workspace'.format(config.params['project']),
         'mount-point': "{workdir}/workspace".format(**run),
         'skip-untrusted': True,
     })
 
     docker_worker_add_artifacts(config, job, taskdesc)
-    add_tooltool(config, job, taskdesc)
+    if run['tooltool-downloads']:
+        internal = run['tooltool-downloads'] == 'internal'
+        add_tooltool(config, job, taskdesc, internal=internal)
 
     env = worker.setdefault('env', {})
     env.update({
         'MOZHARNESS_DISABLE': 'true',
         'SPIDERMONKEY_VARIANT': run.pop('spidermonkey-variant'),
         'MOZ_BUILD_DATE': config.params['moz_build_date'],
         'MOZ_SCM_LEVEL': config.params['level'],
         'GECKO_PATH': '{}/workspace/build/src'.format(run['workdir'])
@@ -87,16 +95,19 @@ def docker_worker_spidermonkey(config, j
 def generic_worker_spidermonkey(config, job, taskdesc):
     assert job['worker']['os'] == 'windows', 'only supports windows right now'
 
     run = job['run']
 
     worker = taskdesc['worker'] = job['worker']
 
     generic_worker_add_artifacts(config, job, taskdesc)
+    if run['tooltool-downloads']:
+        internal = run['tooltool-downloads'] == 'internal'
+        add_tooltool(config, job, taskdesc, internal=internal)
 
     env = worker.setdefault('env', {})
     env.update({
         'MOZHARNESS_DISABLE': 'true',
         'SPIDERMONKEY_VARIANT': run.pop('spidermonkey-variant'),
         'MOZ_BUILD_DATE': config.params['moz_build_date'],
         'MOZ_SCM_LEVEL': config.params['level'],
         'SCCACHE_DISABLE': "1",