Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/taskcluster/taskgraph/actions/release_promotion.py b/taskcluster/taskgraph/actions/release_promotion.py
- --- a/taskcluster/taskgraph/actions/release_promotion.py
- +++ b/taskcluster/taskgraph/actions/release_promotion.py
- @@ -16,76 +16,76 @@ from .util import (find_decision_task, f
- from taskgraph.util.taskcluster import get_artifact
- from taskgraph.util.partials import populate_release_history
- from taskgraph.util.partners import fix_partner_config
- from taskgraph.taskgraph import TaskGraph
- from taskgraph.decision import taskgraph_decision
- from taskgraph.parameters import Parameters
- from taskgraph.util.attributes import RELEASE_PROMOTION_PROJECTS
- -RELEASE_PROMOTION_CONFIG = {
- - 'promote_fennec': {
- +RELEASE_PROMOTION_CONFIG = [
- + {'promote_fennec': {
- 'target_tasks_method': 'promote_fennec',
- 'product': 'fennec',
- - },
- - 'ship_fennec': {
- + }},
- + {'ship_fennec': {
- 'target_tasks_method': 'ship_fennec',
- 'product': 'fennec',
- - },
- - 'ship_fennec_rc': {
- + }},
- + {'ship_fennec_rc': {
- 'target_tasks_method': 'ship_fennec',
- 'product': 'fennec',
- 'release_type': 'rc',
- - },
- - 'promote_firefox': {
- + }},
- + {'promote_firefox': {
- 'target_tasks_method': 'promote_firefox',
- 'product': 'firefox',
- - },
- - 'push_firefox': {
- + }},
- + {'push_firefox': {
- 'target_tasks_method': 'push_firefox',
- 'product': 'firefox',
- - },
- - 'ship_firefox': {
- + }},
- + {'ship_firefox': {
- 'target_tasks_method': 'ship_firefox',
- 'product': 'firefox',
- - },
- - 'promote_firefox_rc': {
- + }},
- + {'promote_firefox_rc': {
- 'target_tasks_method': 'promote_firefox',
- 'product': 'firefox',
- 'release_type': 'rc',
- - },
- - 'ship_firefox_rc': {
- + }},
- + {'ship_firefox_rc': {
- 'target_tasks_method': 'ship_firefox',
- 'product': 'firefox',
- 'release_type': 'rc',
- - },
- - 'promote_firefox_partners': {
- + }},
- + {'promote_firefox_partners': {
- 'target_tasks_method': 'promote_firefox',
- 'product': 'firefox',
- 'rebuild_kinds': [
- 'release-partner-repack',
- 'release-partner-beetmover',
- 'release-partner-repack-chunking-dummy',
- 'release-partner-repackage-signing',
- 'release-partner-repackage',
- 'release-partner-signing',
- ],
- - },
- - 'promote_devedition': {
- + }},
- + {'promote_devedition': {
- 'target_tasks_method': 'promote_devedition',
- 'product': 'devedition',
- - },
- - 'push_devedition': {
- + }},
- + {'push_devedition': {
- 'target_tasks_method': 'push_devedition',
- 'product': 'devedition',
- - },
- - 'ship_devedition': {
- + }},
- + {'ship_devedition': {
- 'target_tasks_method': 'ship_devedition',
- 'product': 'devedition',
- - },
- + }},
- }
- VERSION_BUMP_FLAVORS = (
- 'ship_fennec',
- 'ship_firefox',
- 'ship_devedition',
- )
- @@ -144,17 +144,17 @@ def is_release_promotion_available(param
- 'description': ('Optional: the revision to promote. If specified, '
- 'and if neither `pushlog_id` nor `previous_graph_kinds` '
- 'is specified, find the `pushlog_id using the '
- 'revision.'),
- },
- 'release_promotion_flavor': {
- 'type': 'string',
- 'description': 'The flavor of release promotion to perform.',
- - 'enum': sorted(RELEASE_PROMOTION_CONFIG.keys()),
- + 'enum': RELEASE_PROMOTION_CONFIG.map(lambda x: x.keys()[0]),
- },
- 'rebuild_kinds': {
- 'type': 'array',
- 'description': ('Optional: an array of kinds to ignore from the previous '
- 'graph(s).'),
- 'items': {
- 'type': 'string',
- },
- @@ -257,17 +257,17 @@ def is_release_promotion_available(param
- 'description': ('Toggle for creating EME-free repacks'),
- },
- },
- "required": ['release_promotion_flavor', 'build_number'],
- }
- )
- def release_promotion_action(parameters, graph_config, input, task_group_id, task_id, task):
- release_promotion_flavor = input['release_promotion_flavor']
- - promotion_config = RELEASE_PROMOTION_CONFIG[release_promotion_flavor]
- + promotion_config = RELEASE_PROMOTION_CONFIG.filter(lambda x: x.keys()[0] == release_promotion_flavor)[0].values()[0]
- release_history = {}
- product = promotion_config['product']
- next_version = str(input.get('next_version') or '')
- if release_promotion_flavor in VERSION_BUMP_FLAVORS:
- # We force str() the input, hence the 'None'
- if next_version in ['', 'None']:
- raise Exception(
- @@ -285,17 +285,17 @@ def release_promotion_action(parameters,
- )
- balrog_prefix = product.title()
- os.environ['PARTIAL_UPDATES'] = partial_updates
- release_history = populate_release_history(
- balrog_prefix, parameters['project'],
- partial_updates=input['partial_updates']
- )
- - promotion_config = RELEASE_PROMOTION_CONFIG[release_promotion_flavor]
- + promotion_config = RELEASE_PROMOTION_CONFIG.filter(lambda x: x.keys()[0] == release_promotion_flavor)[0].values()[0]
- target_tasks_method = promotion_config['target_tasks_method'].format(
- project=parameters['project']
- )
- rebuild_kinds = input.get(
- 'rebuild_kinds', promotion_config.get('rebuild_kinds', [])
- )
- do_not_optimize = input.get(
Add Comment
Please, Sign In to add comment