blob: 23f09136dec21b600a910637822a896b0864b148 [file] [log] [blame] [edit]
#!/usr/bin/env lucicfg
# Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""LUCI project configuration for the franky project.
After modifying this file execute it ('./main.star') to regenerate the configs.
This is also enforced by PRESUBMIT.py script.
"""
lucicfg.check_version("1.28.0", "Please update depot_tools")
# Enable LUCI Realms support.
lucicfg.enable_experiment("crbug.com/1085650")
luci.builder.defaults.experiments.set({
"luci.use_realms": 100,
"use_bbagent": 100,
"use_python3": 100,
})
# Enable v2 bucket names in LUCI Scheduler config.
lucicfg.enable_experiment("crbug.com/1182002")
# Tell lucicfg what files it is allowed to touch.
lucicfg.config(
config_dir = "generated",
fail_on_warnings = True,
lint_checks = ["default"],
)
luci.project(
name = "franky",
buildbucket = "cr-buildbucket.appspot.com",
logdog = "luci-logdog.appspot.com",
swarming = "chromium-swarm.appspot.com",
acls = [
# Publicly readable.
acl.entry(
roles = [
acl.BUILDBUCKET_READER,
acl.LOGDOG_READER,
acl.PROJECT_CONFIGS_READER,
],
groups = "all",
),
# Allow committers to use CQ and to force-trigger and stop CI builds.
acl.entry(
roles = [
acl.SCHEDULER_OWNER,
acl.CQ_COMMITTER,
],
groups = "project-franky-committers",
),
# Ability to launch CQ dry runs.
acl.entry(
roles = acl.CQ_DRY_RUNNER,
groups = "project-franky-tryjob-access",
),
# Group with bots that have write access to the Logdog prefix.
acl.entry(
roles = acl.LOGDOG_WRITER,
groups = "luci-logdog-chromium-writers",
),
],
)
# Per-service tweaks.
luci.logdog(gs_bucket = "chromium-luci-logdog")
luci.cq(
status_host = "chromium-cq-status.appspot.com",
submit_max_burst = 4,
submit_burst_delay = 8 * time.minute,
)
luci.cq_group(
name = "franky",
watch = cq.refset(
repo = "https://chromium.googlesource.com/chromium/src/tools/franky",
refs = ["refs/heads/.+"],
),
retry_config = cq.retry_config(
single_quota = 1,
global_quota = 2,
failure_weight = 1,
transient_failure_weight = 1,
timeout_weight = 2,
),
)
# Resources shared by all subprojects.
luci.bucket(
name = "try",
acls = [
acl.entry(
roles = acl.BUILDBUCKET_TRIGGERER,
groups = [
"project-franky-tryjob-access",
# TODO: use project scoped account
"service-account-cq",
],
),
],
)
def builder(name, os, recipe):
luci.builder(
name = name,
bucket = "try",
executable = luci.recipe(
name = recipe,
cipd_package = "infra/recipe_bundles/chromium.googlesource.com/chromium/src/tools/franky",
),
dimensions = {
"pool": "luci.flex.try",
"cpu": "x86-64",
"os": os,
},
execution_timeout = 10 * time.minute,
service_account = "franky-try-builder@chops-service-accounts.iam.gserviceaccount.com",
)
luci.cq_tryjob_verifier(
builder = "try/" + name,
cq_group = "franky",
disable_reuse = name == "Presubmit",
)
builder("Presubmit", "Linux", "presubmit")
builder("Mac Tests", "Mac", "tests")
builder("Linux Tests", "Linux", "tests")