Bug 1381577 - Part D; Add support for not passing --branch and --skip-buildbot-actions to mozharness tasks on windows workers. r=dustin draft
authorJustin Wood <Callek@gmail.com>
Mon, 17 Jul 2017 15:26:36 -0400
changeset 613346 0960c34d734a229a77fea2cffa331c69d68f00b6
parent 613345 429114b19fedad9779740b54ac5fdc3d23b3fe94
child 613347 6fb7671f70d2169225d36c0c728324b01b3f055a
push id69770
push userCallek@gmail.com
push dateFri, 21 Jul 2017 20:09:14 +0000
reviewersdustin
bugs1381577
milestone56.0a1
Bug 1381577 - Part D; Add support for not passing --branch and --skip-buildbot-actions to mozharness tasks on windows workers. r=dustin Land date changes to support windows nightlies onto central MozReview-Commit-ID: BWngsoOaNzg
taskcluster/taskgraph/transforms/job/mozharness.py
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -80,30 +80,38 @@ mozharness_run_schema = Schema({
     Required('keep-artifacts', default=True): bool,
 
     # If specified, use the in-tree job script specified.
     Optional('job-script'): basestring,
 
     Required('requires-signed-builds', default=False): bool,
 
     # If false, don't set MOZ_SIMPLE_PACKAGE_NAME
+    # Only disableable on windows
     Required('use-simple-package', default=True): bool,
+
+    # If false don't pass --branch or --skip-buildbot-actions to mozharness script
+    # Only disableable on windows
+    Required('use-magic-mh-args', default=True): bool,
 })
 
 
 @run_job_using("docker-worker", "mozharness", schema=mozharness_run_schema)
 def mozharness_on_docker_worker_setup(config, job, taskdesc):
     run = job['run']
 
     worker = taskdesc['worker']
     worker['implementation'] = job['worker']['implementation']
 
     if not run['use-simple-package']:
         raise NotImplementedError("Simple packaging cannot be disabled via"
                                   "'use-simple-package' on docker-workers")
+    if not run['use-magic-mh-args']:
+        raise NotImplementedError("Cannot disabled mh magic arg passing via"
+                                  "'use-magic-mh-args' on docker-workers")
 
     # running via mozharness assumes desktop-build (which contains build.sh)
     taskdesc['worker']['docker-image'] = {"in-tree": "desktop-build"}
 
     worker['relengapi-proxy'] = False  # but maybe enabled for tooltool below
     worker['taskcluster-proxy'] = run.get('taskcluster-proxy')
 
     docker_worker_add_public_artifacts(config, job, taskdesc)
@@ -224,18 +232,20 @@ def mozharness_on_generic_worker(config,
         raise Exception(
             "Task generation for mozharness build jobs currently only supported on Windows"
         )
 
     mh_command = [r'c:\mozilla-build\python\python.exe']
     mh_command.append('\\'.join([r'.\build\src\testing', run['script'].replace('/', '\\')]))
     for cfg in run['config']:
         mh_command.append('--config ' + cfg.replace('/', '\\'))
-    mh_command.append('--branch ' + config.params['project'])
-    mh_command.append(r'--skip-buildbot-actions --work-dir %cd:Z:=z:%\build')
+    if run['use-magic-mh-args']:
+        mh_command.append('--branch ' + config.params['project'])
+        mh_command.append(r'--skip-buildbot-actions')
+    mh_command.append(r'--work-dir %cd:Z:=z:%\build')
     for action in run.get('actions', []):
         mh_command.append('--' + action)
 
     for option in run.get('options', []):
         mh_command.append('--' + option)
     if run.get('custom-build-variant-cfg'):
         mh_command.append('--custom-build-variant')
         mh_command.append(run['custom-build-variant-cfg'])