bug 1423081 - inherit shipping-product from upstream. r=callek
MozReview-Commit-ID: 88NKe04ql1a
--- a/taskcluster/taskgraph/loader/single_dep.py
+++ b/taskcluster/taskgraph/loader/single_dep.py
@@ -49,9 +49,16 @@ def loader(kind, path, config, params, l
if config_attrs - set(task.attributes):
# make sure all attributes exist
continue
job = {'dependent-task': task}
if job_template:
job.update(copy.deepcopy(job_template))
+ # copy shipping_product from upstream
+ product = task.attributes.get(
+ 'shipping_product', task.task.get('shipping-product')
+ )
+ if product:
+ job.setdefault('shipping-product', product)
+
yield job
--- a/taskcluster/taskgraph/transforms/checksums_signing.py
+++ b/taskcluster/taskgraph/transforms/checksums_signing.py
@@ -24,16 +24,18 @@ taskref_or_string = Any(
basestring,
{Required('task-reference'): basestring})
checksums_signing_description_schema = Schema({
Required('dependent-task'): object,
Required('depname', default='beetmover'): basestring,
Optional('label'): basestring,
Optional('treeherder'): task_description_schema['treeherder'],
+ Optional('shipping-product'): task_description_schema['shipping-product'],
+ Optional('shipping-phase'): task_description_schema['shipping-phase'],
})
@transforms.add
def validate(config, jobs):
for job in jobs:
label = job.get('dependent-task', object).__dict__.get('label', '?no-label?')
yield validate_schema(
--- a/taskcluster/taskgraph/util/attributes.py
+++ b/taskcluster/taskgraph/util/attributes.py
@@ -21,17 +21,19 @@ RELEASE_PROJECTS = {
}
RELEASE_PROMOTION_PROJECTS = {
'jamun',
'maple',
'try',
} | RELEASE_PROJECTS
-_OPTIONAL_ATTRIBUTES = ('nightly', 'signed', 'l10n_chunk')
+_OPTIONAL_ATTRIBUTES = (
+ 'nightly', 'signed', 'l10n_chunk', 'shipping_product', 'shipping_phase'
+)
def attrmatch(attributes, **kwargs):
"""Determine whether the given set of task attributes matches. The
conditions are given as keyword arguments, where each keyword names an
attribute. The keyword value can be a literal, a set, or a callable. A
literal must match the attribute exactly. Given a set, the attribute value
must be in the set. A callable is called with the attribute value. If an