blob: 9b13748f2a6ec6ee5f352c7767c7da727a46fdde [file] [log] [blame]
"""Recipe bundler builder definition.
It fetches recipes from the repository and bundles them and all their transitive
dependencies as a CIPD package, which is then used by builders that use
`luci.recipe(...)` as an executable.
"""
def bundler(
name,
repo_specs,
triggered_by = None):
luci.builder(
name = name,
bucket = "prod",
priority = 20,
description_html = "Builder to bundle recipe changes and upload bundled recipe package to CIPD.",
executable = luci.recipe(
name = "recipe_bundler",
cipd_package = "infra/recipe_bundles/chromium.googlesource.com/infra/infra",
cipd_version = "git_revision:acc7f2b0336dd85304eb4ac08143647f22e6812c",
use_bbagent = True,
use_python3 = True,
),
dimensions = {
"pool": "luci.golang.prod",
"os": "Ubuntu",
"cpu": "x86-64",
},
properties = {
# This property controls the version of the recipe_bundler go tool:
# https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/tools/recipe_bundler
"recipe_bundler_vers": "git_revision:e17798c24f16b783aedbf989791ea9caa741bdaf",
# These control the prefix of the CIPD package names that the tool
# will create.
"package_name_prefix": "golang/recipe_bundles",
# The CIPD package prefix for internal recipes.
"package_name_internal_prefix": "golang/recipe_bundles",
# Where to grab the recipes to bundle.
"repo_specs": repo_specs,
},
service_account = "recipe-bundler@golang-ci-luci.iam.gserviceaccount.com",
expiration_timeout = 15 * time.minute,
execution_timeout = 10 * time.minute,
triggered_by = triggered_by,
)
luci.list_view_entry(
builder = name,
list_view = "prod-builders",
)
bundler(
name = "recipe-bundler",
repo_specs = [
"go.googlesource.com/build=FETCH_HEAD,refs/heads/luci-config",
],
triggered_by = [
luci.gitiles_poller(
name = "build-luci-config-poller",
bucket = "prod",
repo = "https://go.googlesource.com/build",
refs = ["refs/heads/luci-config"],
),
],
)