Bug 1532783: [taskgraph] Move handling of windows scopes to taskgraph.transfroms.task; r=dustin

Currently the scopes are handled in some test-specific code. However, there is
logic not to be in generic code.

Differential Revision: https://phabricator.services.mozilla.com/D22447

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Prince 2019-03-08 07:00:02 +00:00
Родитель 1f9563dfda
Коммит 4834d960f8
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -204,12 +204,6 @@ def mozharness_test_on_generic_worker(config, job, taskdesc):
upstream_task = '<build-signing>' if mozharness['requires-signed-builds'] else '<build>'
installer_url = get_artifact_url(upstream_task, mozharness['build-artifact-name'])
taskdesc['scopes'].extend(
['generic-worker:os-group:{}/{}'.format(
job['worker-type'],
group
) for group in test['os-groups']])
worker['os-groups'] = test['os-groups']
# run-as-administrator is a feature for workers with UAC enabled and as such should not be
@ -220,8 +214,6 @@ def mozharness_test_on_generic_worker(config, job, taskdesc):
# for more information about UAC.
if test.get('run-as-administrator', False):
if job['worker-type'].startswith('aws-provisioner-v1/gecko-t-win10-64'):
taskdesc['scopes'].extend(
['generic-worker:run-as-administrator:{}'.format(job['worker-type'])])
worker['run-as-administrator'] = True
else:
raise Exception('run-as-administrator not supported on {}'.format(job['worker-type']))

Просмотреть файл

@ -808,8 +808,13 @@ def build_generic_worker_payload(config, task, task_def):
if mounts:
task_def['payload']['mounts'] = mounts
if worker.get('os-groups', []):
if worker.get('os-groups'):
task_def['payload']['osGroups'] = worker['os-groups']
task_def['scopes'].extend(
['generic-worker:os-group:{}/{}'.format(
task['worker-type'],
group
) for group in worker['os-groups']])
features = {}
@ -824,6 +829,9 @@ def build_generic_worker_payload(config, task, task_def):
if worker.get('run-as-administrator', False):
features['runAsAdministrator'] = True
task_def['scopes'].append(
'generic-worker:run-as-administrator:{}'.format(task['worker-type']),
)
if features:
task_def['payload']['features'] = features