Bug 1497575: [staging-release] Add a target task's method that includes all release builds; r=aki
authorTom Prince <mozilla@hocat.ca>
Wed, 17 Oct 2018 17:14:58 +0000
changeset 490103 21477e61b5e12d48fe081f0576f2b6816c3b1606
parent 490102 29ccb9942a39045f8d9f7f35d894678a7c2c8e1c
child 490104 cc20c7974801cb69129d1bf78b40b9f92f364b98
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersaki
bugs1497575
milestone64.0a1
Bug 1497575: [staging-release] Add a target task's method that includes all release builds; r=aki Differential Revision: https://phabricator.services.mozilla.com/D8623
taskcluster/taskgraph/target_tasks.py
--- a/taskcluster/taskgraph/target_tasks.py
+++ b/taskcluster/taskgraph/target_tasks.py
@@ -566,8 +566,24 @@ def target_tasks_file_update(full_task_g
 @_target_task('cron_bouncer_check')
 def target_tasks_bouncer_check(full_task_graph, parameters, graph_config):
     """Select the set of tasks required to perform bouncer version verification.
     """
     def filter(task):
         # For now any task in the repo-update kind is ok
         return task.kind in ['cron-bouncer-check']
     return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
+
+
+@_target_task('staging_release_builds')
+def target_tasks_staging_release(full_task_graph, parameters, graph_config):
+    """
+    Select all builds that are part of releases.
+    """
+
+    def filter(task):
+        if not task.attributes.get('shipping_product'):
+            return False
+        if task.attributes.get('shipping_phase') == 'build':
+            return True
+        return False
+
+    return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]