bug 1372412 - reenable osx opt builds on beta. r=catlee draft
authorAki Sasaki <asasaki@mozilla.com>
Mon, 12 Jun 2017 16:09:34 -0700
changeset 592933 b6e883ccea644175585ce31571cc2db911af3f7b
parent 592932 b1940873102d01722956b79991166286e121072a
child 632968 cbd9152b46e2786b27871e573382ec9c1b2a0488
push id63542
push userasasaki@mozilla.com
push dateMon, 12 Jun 2017 23:14:26 +0000
reviewerscatlee
bugs1372412
milestone56.0a1
bug 1372412 - reenable osx opt builds on beta. r=catlee This patch moves the mozilla_beta_tasks filter() function out, so we can call it from mozilla_release_tasks. This is mainly so we can disable osx opt tc builds on release, while enabling on beta. MozReview-Commit-ID: 9OWZmDrn7On
taskcluster/taskgraph/target_tasks.py
--- a/taskcluster/taskgraph/target_tasks.py
+++ b/taskcluster/taskgraph/target_tasks.py
@@ -226,50 +226,61 @@ def target_tasks_nightly_linux(full_task
     and, eventually, uploading the tasks to balrog."""
     def filter(task):
         platform = task.attributes.get('build_platform')
         if platform in ('linux64-nightly', 'linux-nightly'):
             return task.attributes.get('nightly', False)
     return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
 
 
+def filter_beta_release(task, parameters):
+    if not standard_filter(task, parameters):
+        return False
+    platform = task.attributes.get('build_platform')
+    if platform in ('linux64-pgo', 'linux-pgo', 'android-api-15-nightly',
+                    'android-x86-nightly'):
+        return False
+    if platform in ('linux64', 'linux'):
+        if task.attributes['build_type'] == 'opt':
+            return False
+    # skip l10n, beetmover, balrog
+    if task.kind in [
+        'balrog', 'beetmover', 'beetmover-checksums', 'beetmover-l10n',
+        'checksums-signing', 'nightly-l10n', 'nightly-l10n-signing',
+        'push-apk', 'push-apk-breakpoint',
+    ]:
+        return False
+    return True
+
+
 @_target_task('mozilla_beta_tasks')
 def target_tasks_mozilla_beta(full_task_graph, parameters):
     """Select the set of tasks required for a promotable beta or release build
     of linux, plus android CI. The candidates build process involves a pipeline
     of builds and signing, but does not include beetmover or balrog jobs."""
 
-    def filter(task):
-        if not standard_filter(task, parameters):
-            return False
-        platform = task.attributes.get('build_platform')
-        if platform in ('linux64-pgo', 'linux-pgo', 'android-api-15-nightly',
-                        'android-x86-nightly'):
-            return False
-        if platform in ('linux64', 'linux', 'macosx64'):
-            if task.attributes['build_type'] == 'opt':
-                return False
-        # skip l10n, beetmover, balrog
-        if task.kind in [
-            'balrog', 'beetmover', 'beetmover-checksums', 'beetmover-l10n',
-            'checksums-signing', 'nightly-l10n', 'nightly-l10n-signing',
-            'push-apk', 'push-apk-breakpoint',
-        ]:
-            return False
-        return True
-
-    return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
+    return [l for l, t in full_task_graph.tasks.iteritems() if filter_beta_release(t, parameters)]
 
 
 @_target_task('mozilla_release_tasks')
 def target_tasks_mozilla_release(full_task_graph, parameters):
     """Select the set of tasks required for a promotable beta or release build
     of linux, plus android CI. The candidates build process involves a pipeline
     of builds and signing, but does not include beetmover or balrog jobs."""
-    return target_tasks_mozilla_beta(full_task_graph, parameters)
+
+    def filter(task):
+        if not filter_beta_release(task):
+            return False
+        # Release shouldn't enable macosx64 opt until 56.0
+        if platform in ("macosx64", ):
+            if task.attributes['build_type'] == 'opt':
+                return False
+        return True
+
+    return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
 
 
 @_target_task('candidates_fennec')
 def target_tasks_candidates_fennec(full_task_graph, parameters):
     """Select the set of tasks required for a candidates build of fennec. The
     nightly build process involves a pipeline of builds, signing,
     and, eventually, uploading the tasks to balrog."""
     filtered_for_project = target_tasks_nightly_fennec(full_task_graph, parameters)