Bug 1562412 - adjust mac-behavior by project and kind. r=nthomas

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Aki Sasaki 2020-02-25 15:38:27 +00:00
Родитель a01c7f848c
Коммит a84262350e
4 изменённых файлов: 18 добавлений и 16 удалений

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

@ -464,11 +464,8 @@ workers:
mac-notarization:
mac-behavior:
by-release-type:
nightly.*: mac_notarize
beta.*: mac_notarize
esr.*: mac_notarize
release.*: mac_notarize
by-project:
mozilla-(central|beta|release|esr.*): mac_notarize
default: mac_sign_and_pkg
mac-entitlements:
by-platform:

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

@ -88,7 +88,7 @@ graph_config_schema = Schema({
},
Required('mac-notarization'): {
Required('mac-behavior'):
optionally_keyed_by('platform', 'release-type',
optionally_keyed_by('project',
Any('mac_notarize', 'mac_geckodriver', 'mac_sign',
'mac_sign_and_pkg')),
Required('mac-entitlements'):

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

@ -176,6 +176,19 @@ def make_task_description(config, jobs):
}
if 'macosx' in build_platform:
mac_behavior = evaluate_keyed_by(
config.graph_config['mac-notarization']['mac-behavior'],
'mac behavior',
{'project': config.params['project']},
)
if mac_behavior == 'mac_notarize':
if 'part-1' in config.kind:
mac_behavior = 'mac_notarize_part_1'
elif config.kind.endswith('signing'):
mac_behavior = 'mac_notarize_part_3'
else:
raise Exception("Unknown kind {} for mac_behavior!".format(config.kind))
task['worker']['mac-behavior'] = mac_behavior
worker_type_alias_map = {
'linux-depsigning': 'mac-depsigning',
'linux-signing': 'mac-signing',
@ -188,15 +201,6 @@ def make_task_description(config, jobs):
" ({} not found in mapping)".format(worker_type_alias)
)
worker_type_alias = worker_type_alias_map[worker_type_alias]
mac_behavior = evaluate_keyed_by(
config.graph_config['mac-notarization']['mac-behavior'],
'mac behavior',
{
'release-type': config.params['release_type'],
'platform': build_platform,
},
)
task['worker']['mac-behavior'] = mac_behavior
if job.get('entitlements-url'):
task['worker']['entitlements-url'] = job['entitlements-url']

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

@ -912,7 +912,8 @@ def build_generic_worker_payload(config, task, task_def):
# behavior for mac iscript
Optional('mac-behavior'): Any(
"mac_notarize", "mac_sign", "mac_sign_and_pkg", "mac_geckodriver",
"mac_notarize_part_1", "mac_notarize_part_3", "mac_sign_and_pkg",
"mac_geckodriver",
),
Optional('entitlements-url'): text_type,
})