Bug 1405412 - Pre: Allow toolchain task images to not cache tc-vcs. r=dustin draft
authorNick Alexander <nalexander@mozilla.com>
Thu, 05 Oct 2017 15:55:23 -0700
changeset 680319 87dec4fdb32290ef396cda7f92da6bd688bc5b7b
parent 680318 c62434c4068d31f5a42610de28656b1714969a81
child 680320 81dbb065f2a3c4e7733e964be66adb1733db52c6
push id84460
push usernalexander@mozilla.com
push dateFri, 13 Oct 2017 20:42:27 +0000
reviewersdustin
bugs1405412
milestone58.0a1
Bug 1405412 - Pre: Allow toolchain task images to not cache tc-vcs. r=dustin Not all Docker images are configured for tc-vcs caches: in particular, android-build is not configured. Until we fully remove tc-vcs, this will let toolchain tasks use non-tc-vcs caching images. MozReview-Commit-ID: CYSdn2kpF3S
taskcluster/taskgraph/transforms/job/toolchain.py
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -42,16 +42,19 @@ toolchain_run_schema = Schema({
     # If not false, tooltool downloads will be enabled via relengAPIProxy
     # for either just public files, or all files.  Not supported on Windows
     Required('tooltool-downloads', default=False): Any(
         False,
         'public',
         'internal',
     ),
 
+    # If true, tc-vcs will be enabled.  Not supported on Windows.
+    Required('tc-vcs', default=True): bool,
+
     # Paths/patterns pointing to files that influence the outcome of a
     # toolchain build.
     Optional('resources'): [basestring],
 
     # Path to the artifact produced by the toolchain job
     Required('toolchain-artifact'): basestring,
 
     # An alias that can be used instead of the real toolchain job name in
@@ -115,17 +118,18 @@ def docker_worker_toolchain(config, job,
     worker['chain-of-trust'] = True
 
     # Allow the job to specify where artifacts come from, but add
     # public/build if it's not there already.
     artifacts = worker.setdefault('artifacts', [])
     if not any(artifact.get('name') == 'public/build' for artifact in artifacts):
         docker_worker_add_public_artifacts(config, job, taskdesc)
 
-    docker_worker_add_tc_vcs_cache(config, job, taskdesc)
+    if run['tc-vcs']:
+        docker_worker_add_tc_vcs_cache(config, job, taskdesc)
     docker_worker_add_gecko_vcs_env_vars(config, job, taskdesc)
     support_vcs_checkout(config, job, taskdesc, sparse=True)
 
     env = worker['env']
     env.update({
         'MOZ_BUILD_DATE': config.params['moz_build_date'],
         'MOZ_SCM_LEVEL': config.params['level'],
         'TOOLS_DISABLE': 'true',