Bug 1381577 - Part D; Add support for not passing --branch and --skip-buildbot-actions to mozharness tasks on windows workers. r=dustin
authorJustin Wood <Callek@gmail.com>
Mon, 17 Jul 2017 15:26:36 -0400
changeset 418967 fdb3b53456b2bd2f4e6e8ba60e40c940df41c7b9
parent 418966 f38012a5f818bc572b3149e3d34d551f618d51ba
child 418968 9fb0158afc853e908610583e865fa7882f3da772
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1381577
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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'])