bug 1423081 - inherit shipping-product from upstream. r=callek
authorAki Sasaki <asasaki@mozilla.com>
Tue, 05 Dec 2017 19:10:48 -0800
changeset 448081 13d6dfaa9bce4b23bf116064355a8b0babd34a64
parent 448080 960aa6859716029636041811e14a3da379d59d83
child 448082 3f06fb0261cebc5604013cb4dafb4db40771d153
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscallek
bugs1423081
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1423081 - inherit shipping-product from upstream. r=callek MozReview-Commit-ID: 88NKe04ql1a
taskcluster/taskgraph/loader/single_dep.py
taskcluster/taskgraph/transforms/checksums_signing.py
taskcluster/taskgraph/util/attributes.py
--- 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