mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1501878 - required_signoffs and signoff_urls parameters r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D11733 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
041b7255f8
commit
33daabf319
@ -176,6 +176,12 @@ Release Promotion
|
||||
``release_product``
|
||||
The product that is being released.
|
||||
|
||||
``required_signoffs``
|
||||
A list of signoffs that are required for this release promotion flavor. If specified, and if the corresponding `signoff_urls` url isn't specified, tasks that require these signoffs will not be scheduled.
|
||||
|
||||
``signoff_urls``
|
||||
A dictionary of signoff keys to url values. These are the urls marking the corresponding ``required_signoffs`` as signed off.
|
||||
|
||||
Comm Push Information
|
||||
---------------------
|
||||
|
||||
|
@ -29,6 +29,9 @@ from taskgraph.parameters import Parameters
|
||||
from taskgraph.util.attributes import RELEASE_PROMOTION_PROJECTS
|
||||
|
||||
|
||||
RELEASE_PROMOTION_SIGNOFFS = ('mar-signing', )
|
||||
|
||||
|
||||
def is_release_promotion_available(parameters):
|
||||
return parameters['project'] in RELEASE_PROMOTION_PROJECTS
|
||||
|
||||
@ -40,6 +43,27 @@ def get_partner_config(partner_url_config, github_token):
|
||||
return partner_config
|
||||
|
||||
|
||||
def get_signoff_properties():
|
||||
props = {}
|
||||
for signoff in RELEASE_PROMOTION_SIGNOFFS:
|
||||
props[signoff] = {
|
||||
'type': 'string',
|
||||
}
|
||||
return props
|
||||
|
||||
|
||||
def get_required_signoffs(input, parameters):
|
||||
input_signoffs = set(input.get('required_signoffs', []))
|
||||
params_signoffs = set(parameters['required_signoffs'] or [])
|
||||
return sorted(list(input_signoffs | params_signoffs))
|
||||
|
||||
|
||||
def get_signoff_urls(input, parameters):
|
||||
signoff_urls = parameters['signoff_urls']
|
||||
signoff_urls.update(input.get('signoff_urls', {}))
|
||||
return signoff_urls
|
||||
|
||||
|
||||
def get_flavors(graph_config, param):
|
||||
"""
|
||||
Get all flavors with the given parameter enabled.
|
||||
@ -197,6 +221,19 @@ def get_flavors(graph_config, param):
|
||||
'default': False,
|
||||
'description': ('Toggle for creating EME-free repacks'),
|
||||
},
|
||||
'required_signoffs': {
|
||||
'type': 'array',
|
||||
'description': ('The flavor of release promotion to perform.'),
|
||||
'items': {
|
||||
'enum': RELEASE_PROMOTION_SIGNOFFS,
|
||||
}
|
||||
},
|
||||
'signoff_urls': {
|
||||
'type': 'object',
|
||||
'default': {},
|
||||
'additionalProperties': False,
|
||||
'properties': get_signoff_properties(),
|
||||
},
|
||||
},
|
||||
"required": ['release_promotion_flavor', 'build_number'],
|
||||
}
|
||||
@ -308,6 +345,9 @@ def release_promotion_action(parameters, graph_config, input, task_group_id, tas
|
||||
if input['version']:
|
||||
parameters['version'] = input['version']
|
||||
|
||||
parameters['required_signoffs'] = get_required_signoffs(input, parameters)
|
||||
parameters['signoff_urls'] = get_signoff_urls(input, parameters)
|
||||
|
||||
# make parameters read-only
|
||||
parameters = Parameters(**parameters)
|
||||
|
||||
|
@ -238,6 +238,8 @@ def get_decision_parameters(config, options):
|
||||
parameters['release_partner_build_number'] = 1
|
||||
parameters['release_enable_emefree'] = False
|
||||
parameters['release_product'] = None
|
||||
parameters['required_signoffs'] = []
|
||||
parameters['signoff_urls'] = {}
|
||||
parameters['try_mode'] = None
|
||||
parameters['try_task_config'] = None
|
||||
parameters['try_options'] = None
|
||||
|
@ -78,6 +78,8 @@ PARAMETERS = {
|
||||
'release_partner_build_number': 1,
|
||||
'release_type': 'nightly',
|
||||
'release_product': None,
|
||||
'required_signoffs': [],
|
||||
'signoff_urls': {},
|
||||
'target_tasks_method': 'default',
|
||||
'try_mode': None,
|
||||
'try_options': None,
|
||||
|
Loading…
Reference in New Issue
Block a user