blob: 3b9f406bbac0faa5231c77acb34305882d1785e9 [file] [log] [blame]
#!/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 ios_tool builders.
The schedulers for ios_tool builds use GoB flutter mirrors
(https://flutter-mirrors.googlesource.com/).
"""
load("//lib/common.star", "common")
load("//lib/consoles.star", "consoles")
load("//lib/helpers.star", "helpers")
load("//lib/repos.star", "repos")
load("//lib/ci_yaml/ci_yaml.star", "ci_yaml")
def _setup():
luci.recipe(
name = "ios-usb-dependencies",
cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes",
cipd_version = "refs/heads/main",
use_bbagent = True,
)
iostools_prod_config()
def ios_tools_builder(name, repo):
"""Creates configurations for ios tool builders.
Args:
name(str): The name of the tool repository.
repo(str): The url of the repository.
"""
builder = name.split("|")[0]
consoles.console_view(builder, repo)
luci.gitiles_poller(
name = "gitiles-trigger-%s" % builder,
bucket = "prod",
refs = ["refs/heads/master"],
repo = repo,
triggers = [builder],
)
# re-use the config from the framework
ci_yaml_config = ci_yaml.ci_yaml("flutter", "master")
platform_properties = ci_yaml.platform_properties(ci_yaml_config)
# The "mac_ios" shards will have the latest Xcode version
platform_key = "mac_ios"
properties = helpers.merge_dicts(
platform_properties[platform_key],
# This key is read by ios-usb-dependencies.py
{"package_name": builder + "-flutter"},
)
# This is configured by ci_yaml.star for true devicelab builders
properties["$flutter/devicelab_osx_sdk"] = {
"sdk_version": properties["xcode"],
}
common.mac_prod_builder(
name = name,
repo = repo,
recipe = "ios-usb-dependencies",
console_view_name = builder,
caches = ci_yaml.swarming_caches("flutter", "master"),
properties = properties,
os = platform_properties[platform_key]["os"],
triggering_policy = scheduler.greedy_batching(
max_concurrent_invocations = 1,
),
)
def iostools_prod_config():
"""Creates prod configurations for iostools."""
ios_tools_builder(
name = "ideviceinstaller|idev",
repo = repos.IDEVICEINSTALLER,
)
ios_tools_builder(
name = "libimobiledevice|libi",
repo = repos.LIBIMOBILEDEVICE,
)
ios_tools_builder(name = "libplist|plist", repo = repos.LIBPLIST)
ios_tools_builder(name = "usbmuxd|usbmd", repo = repos.USBMUXD)
ios_tools_builder(name = "openssl|ssl", repo = repos.OPENSSL)
ios_tools_builder(name = "ios-deploy|deploy", repo = repos.IOS_DEPLOY)
ios_tools_builder(name = "libzip|zip", repo = repos.LIBZIP)
iostools_config = struct(setup = _setup)