Bug 1615311 Add merge day action r=mtabara

Calling the merge day automation requires an action so that we can pass in parameters such as source and destination repository and branch.

Differential Revision: https://phabricator.services.mozilla.com/D62763
This commit is contained in:
Simon Fraser
2020-02-25 10:48:54 +00:00
parent 7cf554920d
commit 3d2d062e1a
9 changed files with 323 additions and 0 deletions

View File

@@ -1292,6 +1292,7 @@ def build_push_addons_payload(config, task, task_def):
Required('force-dry-run', default=True): bool,
Required('push', default=False): bool,
Optional('source-repo'): text_type,
Optional('ssh-user'): text_type,
Optional('l10n-bump-info'): {
Required('name'): text_type,
Required('path'): text_type,
@@ -1304,6 +1305,7 @@ def build_push_addons_payload(config, task, task_def):
Optional('format'): text_type,
}],
},
Optional('merge-info'): object,
})
def build_treescript_payload(config, task, task_def):
worker = task['worker']
@@ -1348,6 +1350,13 @@ def build_treescript_payload(config, task, task_def):
task_def['payload']['l10n_bump_info'] = [l10n_bump_info]
actions.append('l10n_bump')
if worker.get('merge-info'):
merge_info = {}
for k, v in worker['merge-info'].items():
merge_info[k.replace('-', '_')] = worker['merge-info'][k]
task_def['payload']['merge_info'] = merge_info
actions.append('merge_day')
if worker['push']:
actions.append('push')
@@ -1363,6 +1372,9 @@ def build_treescript_payload(config, task, task_def):
if worker.get('source-repo'):
task_def['payload']['source_repo'] = worker['source-repo']
if worker.get('ssh-user'):
task_def['payload']['ssh_user'] = worker['ssh-user']
@payload_builder('invalid', schema={
# an invalid task is one which should never actually be created; this is used in