| #!/usr/bin/env lucicfg |
| # Copyright 2020 The Flutter Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| """ |
| Configurations for the flutter engine repository. |
| |
| The schedulers pull commits indirectly from GoB repo |
| (https://chromium.googlesource.com/external/github.com/flutter/engine) |
| which is mirrored from https://github.com/flutter/engine. |
| |
| Try jobs use github directly but are also registered with luci-cq |
| to take advantage of led recipe builder tests. |
| """ |
| |
| load("//lib/ci_yaml/ci_yaml.star", "ci_yaml") |
| load("//lib/common.star", "common") |
| load("//lib/release_branches/release_branches.star", "release_branches") |
| load("//lib/repos.star", "repos") |
| |
| def _engine_properties(gcs_goldens_bucket = "", no_lto = False): |
| properties = { |
| "use_cas": True, |
| "gcs_goldens_bucket": gcs_goldens_bucket, |
| } |
| if no_lto: |
| properties["no_lto"] = True |
| return properties |
| |
| def _setup(): |
| """Default configurations for branches and repos.""" |
| release_triggering_policy = scheduler.greedy_batching( |
| max_batch_size = 1, |
| max_concurrent_invocations = 3, |
| ) |
| notifies = [ |
| luci.notifier( |
| name = "engine_build_failure_notification", |
| on_occurrence = ["INFRA_FAILURE", "FAILURE"], |
| failed_step_regexp = "(^build|.*test:|.*step is flaky).*", |
| notify_emails = ["flutter-engine@grotations.appspotmail.com"], |
| ), |
| ] |
| ci_yaml.generate( |
| "engine", |
| "stable", |
| release_branches.stable.version, |
| release_branches.stable.testing_ref, |
| {}, |
| _engine_properties(), |
| release_triggering_policy, |
| recipes_ref = release_branches.stable.recipes_ref, |
| ) |
| _drone_prod_builders("stable-", release_branches.stable) |
| ci_yaml.generate( |
| "engine", |
| "beta", |
| release_branches.beta.version, |
| release_branches.beta.testing_ref, |
| {}, |
| _engine_properties(), |
| release_triggering_policy, |
| recipes_ref = release_branches.beta.recipes_ref, |
| ) |
| _drone_prod_builders("beta-", release_branches.beta) |
| ci_yaml.generate( |
| "engine", |
| "main", |
| release_branches.main.version, |
| release_branches.main.testing_ref, |
| {}, |
| _engine_properties(), |
| notifies = notifies, |
| recipes_ref = release_branches.main.recipes_ref, |
| ) |
| _drone_prod_builders("", release_branches.main) |
| for branch_name in release_branches.fuchsia.keys(): |
| branch = release_branches.fuchsia[branch_name] |
| ci_yaml.generate( |
| "engine", |
| branch_name, |
| branch.version, |
| branch.testing_ref, |
| {}, |
| _engine_properties(), |
| release_triggering_policy, |
| recipes_ref = branch.recipes_ref, |
| ) |
| |
| _drone_staging_prod_builders() |
| _drone_try_builders() |
| |
| def _drone_prod_builders(prefix, branch): |
| """Generate drone builders to help with subshards.""" |
| recipes = ["engine/engine_builder", "engine/web_engine_drone"] |
| for recipe in recipes: |
| luci.recipe( |
| name = "%s%s" % (prefix, recipe), |
| cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes", |
| cipd_version = branch.recipes_ref, |
| use_bbagent = True, |
| ) |
| ci_yaml_config = ci_yaml.ci_yaml("engine", "main") |
| platform_properties = ci_yaml.platform_properties(ci_yaml_config) |
| common.linux_prod_builder( |
| name = "%sLinux Engine Drone" % prefix, |
| recipe = "engine/engine_builder", |
| console_view_name = None, |
| dimensions = {"device_type": "none"}, |
| priority = 30, |
| caches = ci_yaml.swarming_caches("engine", branch.version), |
| os = platform_properties["linux"]["os"], |
| ) |
| common.linux_prod_builder( |
| name = "%sLinux Web Drone" % prefix, |
| recipe = "engine/web_engine_drone", |
| properties = _engine_properties(gcs_goldens_bucket = "flutter_logs"), |
| console_view_name = None, |
| dimensions = {"device_type": "none"}, |
| priority = 28, |
| caches = ci_yaml.swarming_caches("engine", branch.version), |
| os = platform_properties["linux"]["os"], |
| ) |
| common.mac_prod_builder( |
| name = "%sMac Engine Drone" % prefix, |
| recipe = "engine/engine_builder", |
| console_view_name = None, |
| priority = 30, |
| dimensions = {"device_type": "none"}, |
| caches = ci_yaml.swarming_caches("engine", branch.version), |
| os = platform_properties["mac"]["os"], |
| ) |
| common.windows_prod_builder( |
| name = "%sWindows Engine Drone" % prefix, |
| recipe = "engine/engine_builder", |
| console_view_name = None, |
| dimensions = {"device_type": "none"}, |
| priority = 30, |
| caches = ci_yaml.swarming_caches("engine", branch.version), |
| os = platform_properties["windows"]["os"], |
| ) |
| |
| def _drone_staging_prod_builders(): |
| """Generate drone builders to help with subshards.""" |
| engine_v2_builder_recipe_name = "engine_v2/builder" |
| recipes = [engine_v2_builder_recipe_name] |
| for recipe in recipes: |
| luci.recipe( |
| name = recipe, |
| cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes", |
| cipd_version = "refs/heads/main", |
| use_bbagent = True, |
| ) |
| ci_yaml_config = ci_yaml.ci_yaml("engine", "main") |
| platform_properties = ci_yaml.platform_properties(ci_yaml_config) |
| version = None # Use caches from ToT |
| common.linux_prod_builder( |
| name = "Linux Staging Engine Drone|drn", |
| recipe = engine_v2_builder_recipe_name, |
| repo = repos.GIT_REMOTE["engine"], |
| bucket = "staging", |
| pool = "luci.flutter.staging", |
| console_view_name = None, |
| priority = 30, |
| caches = ci_yaml.swarming_caches("engine", version), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["linux"]["os"], |
| ) |
| common.mac_prod_builder( |
| name = "Mac Staging Engine Drone|drn", |
| recipe = engine_v2_builder_recipe_name, |
| repo = repos.GIT_REMOTE["engine"], |
| bucket = "staging", |
| pool = "luci.flutter.staging", |
| console_view_name = None, |
| priority = 30, |
| dimensions = {"device_type": "none"}, |
| caches = ci_yaml.swarming_caches("engine", version), |
| os = platform_properties["mac"]["os"], |
| ) |
| common.windows_prod_builder( |
| name = "Windows Staging Engine Drone|drn", |
| recipe = engine_v2_builder_recipe_name, |
| repo = repos.GIT_REMOTE["engine"], |
| bucket = "staging", |
| pool = "luci.flutter.staging", |
| console_view_name = None, |
| priority = 30, |
| caches = ci_yaml.swarming_caches("engine", version), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["windows"]["os"], |
| ) |
| |
| def _drone_try_builders(): |
| """Generate drone builders to help with subshards.""" |
| list_view_name = "engine-try" |
| ci_yaml_config = ci_yaml.ci_yaml("engine", "main") |
| platform_properties = ci_yaml.platform_properties(ci_yaml_config) |
| version = None # Uses caches from ToT |
| common.linux_try_builder( |
| name = "Linux Engine Drone|drn", |
| recipe = "engine/engine_builder", |
| repo = repos.GIT_REMOTE["engine"], |
| list_view_name = list_view_name, |
| caches = ci_yaml.swarming_caches("engine", version), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["linux"]["os"], |
| ) |
| common.linux_try_builder( |
| name = "Linux Web Drone|webdrn", |
| recipe = "engine/web_engine_drone", |
| repo = repos.GIT_REMOTE["engine"], |
| list_view_name = list_view_name, |
| properties = _engine_properties( |
| gcs_goldens_bucket = "flutter_logs", |
| no_lto = True, |
| ), |
| caches = ci_yaml.swarming_caches("engine", version), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["linux"]["os"], |
| ) |
| common.mac_try_builder( |
| name = "Mac Engine Drone|drn", |
| recipe = "engine/engine_builder", |
| repo = repos.GIT_REMOTE["engine"], |
| list_view_name = list_view_name, |
| caches = ci_yaml.swarming_caches("engine", version), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["mac"]["os"], |
| ) |
| common.windows_try_builder( |
| name = "Windows Engine Drone|drn", |
| recipe = "engine/engine_builder", |
| repo = repos.GIT_REMOTE["engine"], |
| list_view_name = list_view_name, |
| caches = ci_yaml.swarming_caches("engine", version), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["windows"]["os"], |
| ) |
| |
| engine_config = struct(setup = _setup) |