зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1458700: [release-promotion] Add shipping-product list to graph config; r=aki
Differential Revision: https://phabricator.services.mozilla.com/D1111 --HG-- extra : source : d8ff2432bef5acc4f4d33ec983098cd47a0ac9d5 extra : amend_source : b25306140f25eef1c44127d3d77bb7471fb97344 extra : intermediate-source : 3cdfec4f89674ad248aa09566bef61bf43aa1eb0
This commit is contained in:
Родитель
397494c8d5
Коммит
74d785280e
|
@ -104,6 +104,12 @@ try:
|
|||
- 'sm-plain-win32'
|
||||
- 'sm-compacting-win32'
|
||||
|
||||
release-promotion:
|
||||
products:
|
||||
- 'devedition'
|
||||
- 'fennec'
|
||||
- 'firefox'
|
||||
|
||||
scriptworker:
|
||||
# See additional configuration in taskcluster/taskgraph/util/scriptworker.py
|
||||
scope-prefix: 'project:releng'
|
||||
|
|
|
@ -30,6 +30,9 @@ graph_config_schema = Schema({
|
|||
# all"
|
||||
Required('ridealong-builds', default={}): {basestring: [basestring]},
|
||||
},
|
||||
Required('release-promotion'): {
|
||||
Required('products'): [basestring],
|
||||
},
|
||||
Required('scriptworker'): {
|
||||
# Prefix to add to scopes controlling scriptworkers
|
||||
Required('scope-prefix'): basestring,
|
||||
|
|
|
@ -169,9 +169,7 @@ task_description_schema = Schema({
|
|||
# release promotion product that this task belongs to.
|
||||
Required('shipping-product'): Any(
|
||||
None,
|
||||
'devedition',
|
||||
'fennec',
|
||||
'firefox',
|
||||
basestring
|
||||
),
|
||||
|
||||
# Coalescing provides the facility for tasks to be superseded by the same
|
||||
|
@ -678,7 +676,7 @@ def superseder_url(config, task):
|
|||
)
|
||||
|
||||
|
||||
UNSUPPORTED_PRODUCT_ERROR = """\
|
||||
UNSUPPORTED_INDEX_PRODUCT_ERROR = """\
|
||||
The gecko-v2 product {product} is not in the list of configured products in
|
||||
`taskcluster/ci/config.yml'.
|
||||
"""
|
||||
|
@ -687,7 +685,7 @@ The gecko-v2 product {product} is not in the list of configured products in
|
|||
def verify_index(config, index):
|
||||
product = index['product']
|
||||
if product not in config.graph_config['index']['products']:
|
||||
raise Exception(UNSUPPORTED_PRODUCT_ERROR.format(product=product))
|
||||
raise Exception(UNSUPPORTED_INDEX_PRODUCT_ERROR.format(product=product))
|
||||
|
||||
|
||||
@payload_builder('docker-worker')
|
||||
|
@ -1240,12 +1238,25 @@ def task_name_from_label(config, tasks):
|
|||
yield task
|
||||
|
||||
|
||||
UNSUPPORTED_SHIPPING_PRODUCT_ERROR = """\
|
||||
The shipping product {product} is not in the list of configured products in
|
||||
`taskcluster/ci/config.yml'.
|
||||
"""
|
||||
|
||||
|
||||
def validate_shipping_product(config, product):
|
||||
if product not in config.graph_config['release-promotion']['products']:
|
||||
raise Exception(UNSUPPORTED_SHIPPING_PRODUCT_ERROR.format(product=product))
|
||||
|
||||
|
||||
@transforms.add
|
||||
def validate(config, tasks):
|
||||
for task in tasks:
|
||||
validate_schema(
|
||||
task_description_schema, task,
|
||||
"In task {!r}:".format(task.get('label', '?no-label?')))
|
||||
if task['shipping-product'] is not None:
|
||||
validate_shipping_product(config, task['shipping-product'])
|
||||
yield task
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче