blob: f4ad488020123aa1fde6d1a0fdc9946175af74b6 [file] [log] [blame]
Robert Iannucci9ed24272021-05-27 15:46:18 -07001#!/usr/bin/env lucicfg
2#
3# Copyright (C) 2021 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18"""LUCI project configuration for the production instance of LUCI.
19
20After modifying this file execute it ('./main.star') to regenerate the configs.
21"""
22
Vadim Shtayurab3b18022022-02-09 11:56:04 -080023lucicfg.check_version("1.30.9", "Please update depot_tools")
Robert Iannucci9ed24272021-05-27 15:46:18 -070024
David Srbecky1ae89252022-04-19 14:03:32 +010025luci.builder.defaults.experiments.set({
26 "luci.recipes.use_python3": 10,
27})
28
Vadim Shtayurab3b18022022-02-09 11:56:04 -080029# Use LUCI Scheduler BBv2 names and add Scheduler realms configs.
Robert Iannucci9ed24272021-05-27 15:46:18 -070030lucicfg.enable_experiment("crbug.com/1182002")
31
32# Tell lucicfg what files it is allowed to touch.
33lucicfg.config(
34 config_dir = "generated",
35 fail_on_warnings = True,
36 lint_checks = ["default"],
37)
38
39# TODO: Switch to project-scoped service account.
Robert Iannucci9ed24272021-05-27 15:46:18 -070040
41luci.project(
42 name = "art",
43 buildbucket = "cr-buildbucket.appspot.com",
44 logdog = "luci-logdog.appspot.com",
45 milo = "luci-milo.appspot.com",
46 notify = "luci-notify.appspot.com",
47 scheduler = "luci-scheduler.appspot.com",
48 swarming = "chromium-swarm.appspot.com",
49 acls = [
50 # Publicly readable.
51 acl.entry(
52 roles = [
53 acl.BUILDBUCKET_READER,
54 acl.LOGDOG_READER,
55 acl.PROJECT_CONFIGS_READER,
56 acl.SCHEDULER_READER,
57 ],
58 groups = "all",
59 ),
60 acl.entry(
61 roles = [
62 acl.BUILDBUCKET_OWNER,
63 acl.SCHEDULER_OWNER,
64 ],
65 groups = "project-art-admins",
66 ),
67 acl.entry(
68 roles = acl.LOGDOG_WRITER,
69 groups = "luci-logdog-chromium-writers",
70 ),
71 ],
Andrii Shyshkalov59033772021-08-16 12:31:30 +020072 bindings = [
73 luci.binding(
74 roles = "role/swarming.poolOwner",
75 groups = "project-art-admins",
76 ),
77 luci.binding(
78 roles = "role/swarming.poolViewer",
79 groups = "all",
80 ),
81 ],
Robert Iannucci9ed24272021-05-27 15:46:18 -070082)
83
84# Per-service tweaks.
85luci.logdog(gs_bucket = "chromium-luci-logdog")
86luci.milo(logo = "https://storage.googleapis.com/chrome-infra-public/logo/art-logo.png")
87
Andrii Shyshkalov59033772021-08-16 12:31:30 +020088# Allow admins to use LED and "Debug" button on every builder and bot.
89luci.binding(
90 realm = "@root",
91 roles = "role/swarming.poolUser",
92 groups = "project-art-admins",
93)
94luci.binding(
95 realm = "@root",
96 roles = "role/swarming.taskTriggerer",
97 groups = "project-art-admins",
98)
99
Robert Iannucci9ed24272021-05-27 15:46:18 -0700100# Resources shared by all subprojects.
101
Andrii Shyshkalov59033772021-08-16 12:31:30 +0200102luci.realm(name = "pools/ci")
Robert Iannucci9ed24272021-05-27 15:46:18 -0700103luci.bucket(name = "ci")
104
105luci.notifier_template(
106 name = "default",
107 body = io.read_file("luci-notify.template"),
108)
109
110luci.console_view(
111 name = "luci",
112 repo = "https://android.googlesource.com/platform/art",
113 title = "ART LUCI Console",
114 refs = ["refs/heads/master"],
115 include_experimental_builds = True,
116)
117
118luci.notifier(
119 name = "art-team+chromium-buildbot",
120 on_new_status = [
121 "FAILURE",
122 "INFRA_FAILURE",
123 ],
124 notify_emails = [
125 "art-team+chromium-buildbot@google.com",
126 ],
127)
128
129luci.gitiles_poller(
Robert Iannucci890f2eb2021-06-08 14:22:02 -0700130 name = "art",
Robert Iannucci9ed24272021-05-27 15:46:18 -0700131 bucket = "ci",
132 repo = "https://android.googlesource.com/platform/art",
133 refs = ["refs/heads/master"],
134)
135
136luci.gitiles_poller(
Robert Iannucci890f2eb2021-06-08 14:22:02 -0700137 name = "libcore",
Robert Iannucci9ed24272021-05-27 15:46:18 -0700138 bucket = "ci",
139 repo = "https://android.googlesource.com/platform/libcore",
140 refs = ["refs/heads/master"],
141)
142
143luci.gitiles_poller(
Robert Iannucci890f2eb2021-06-08 14:22:02 -0700144 name = "manifest",
Robert Iannucci9ed24272021-05-27 15:46:18 -0700145 bucket = "ci",
146 repo = "https://android.googlesource.com/platform/manifest",
147 refs = ["refs/heads/master-art"],
148)
149
150def ci_builder(name, category, short_name):
151 luci.builder(
152 name = name,
153 bucket = "ci",
154 executable = luci.recipe(
155 cipd_package = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",
David Srbecky5e50df52022-04-21 12:07:26 +0100156 cipd_version = "refs/heads/main",
Robert Iannucci9ed24272021-05-27 15:46:18 -0700157 name = "art",
158 ),
159 dimensions = {
160 "pool": "luci.art.ci",
161
162 # Some builders require specific hardware, so we make the assignment in bots.cfg
163 "builder": name,
164 },
165 service_account = "art-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
166
David Srbecky69e093b2021-11-30 16:12:31 +0000167 # Maximum delay between scheduling a build and the build actually starting.
168 # In a healthy state (enough free/idle devices), the delay is fairly small,
169 # but if enough devices are offline, this timeout will cause INFRA_FAILURE.
170 # Set the value reasonably high to prefer delayed builds over failing ones.
171 # NB: LUCI also enforces (expiration_timeout + execution_timeout <= 47).
172 expiration_timeout = 17 * time.hour,
173 execution_timeout = 30 * time.hour,
Robert Iannucci9ed24272021-05-27 15:46:18 -0700174 build_numbers = True,
175 properties = {
176 "builder_group": "client.art",
177 },
178 caches = [
179 # Directory called "art" that persists from build to build (one per bot).
180 # We can checkout and build in this directory to get fast incremental builds.
181 swarming.cache("art", name = "art"),
182 ],
183 notifies = ["art-team+chromium-buildbot"],
184 triggered_by = [
Robert Iannucci890f2eb2021-06-08 14:22:02 -0700185 "art",
186 "libcore",
187 "manifest",
Robert Iannucci9ed24272021-05-27 15:46:18 -0700188 ],
189 )
190 luci.console_view_entry(
191 console_view = "luci",
192 builder = name,
193 category = category,
194 short_name = short_name,
195 )
196
197ci_builder("angler-armv7-debug", "angler|armv7", "dbg")
198ci_builder("angler-armv7-non-gen-cc", "angler|armv7", "ngen")
199ci_builder("angler-armv7-ndebug", "angler|armv7", "ndbg")
200ci_builder("angler-armv8-debug", "angler|armv8", "dbg")
201ci_builder("angler-armv8-non-gen-cc", "angler|armv8", "ngen")
202ci_builder("angler-armv8-ndebug", "angler|armv8", "ndbg")
203ci_builder("bullhead-armv7-gcstress-ndebug", "bullhead|armv7|gcstress", "dbg")
204ci_builder("bullhead-armv8-gcstress-debug", "bullhead|armv8|gcstress", "dbg")
205ci_builder("bullhead-armv8-gcstress-ndebug", "bullhead|armv8|gcstress", "ndbg")
206ci_builder("fugu-debug", "fugu", "dbg")
207ci_builder("fugu-ndebug", "fugu", "ndbg")
208ci_builder("host-x86-cms", "host|x86", "cms")
209ci_builder("host-x86-debug", "host|x86", "dbg")
210ci_builder("host-x86-ndebug", "host|x86", "ndbg")
211ci_builder("host-x86-gcstress-debug", "host|x86", "gcs")
212ci_builder("host-x86-poison-debug", "host|x86", "psn")
213ci_builder("host-x86_64-cdex-fast", "host|x64", "cdx")
214ci_builder("host-x86_64-cms", "host|x64", "cms")
215ci_builder("host-x86_64-debug", "host|x64", "dbg")
216ci_builder("host-x86_64-non-gen-cc", "host|x64", "ngen")
217ci_builder("host-x86_64-ndebug", "host|x64", "ndbg")
218ci_builder("host-x86_64-poison-debug", "host|x64", "psn")
219ci_builder("walleye-armv7-poison-debug", "walleye|armv7|poison", "dbg")
220ci_builder("walleye-armv8-poison-debug", "walleye|armv8|poison", "dbg")
221ci_builder("walleye-armv8-poison-ndebug", "walleye|armv8|poison", "ndbg")