xref: /aosp_15_r20/external/webrtc/infra/config/README.md (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker# infra/config folder
2*d9f75844SAndroid Build Coastguard Worker
3*d9f75844SAndroid Build Coastguard WorkerThis folder contains WebRTC project-wide configurations for Chrome infra
4*d9f75844SAndroid Build Coastguard Workerservices, mainly the CI system ([console][]).
5*d9f75844SAndroid Build Coastguard Worker
6*d9f75844SAndroid Build Coastguard Worker`*.cfg` files are the actual configuration that [LUCI][luci-config] looks at.
7*d9f75844SAndroid Build Coastguard WorkerThey are in *protocol buffer text format*. For example,
8*d9f75844SAndroid Build Coastguard Worker[cr-buildbucket.cfg](cr-buildbucket.cfg) defines builders.
9*d9f75844SAndroid Build Coastguard Worker
10*d9f75844SAndroid Build Coastguard WorkerHowever, they are all automatically generated from the [Starlark][] script
11*d9f75844SAndroid Build Coastguard Worker[config.star](config.star) that defines a unified config using **[lucicfg][]**.
12*d9f75844SAndroid Build Coastguard WorkerThe main body of the config is at the bottom of the file, following all the
13*d9f75844SAndroid Build Coastguard Workerhelper definitions.
14*d9f75844SAndroid Build Coastguard Worker
15*d9f75844SAndroid Build Coastguard Worker`lucicfg` should be available as part of depot_tools. After editing
16*d9f75844SAndroid Build Coastguard Worker[config.star](config.star) you should run `lucicfg generate config.star` to
17*d9f75844SAndroid Build Coastguard Workerre-generate `*.cfg` files. Check the diffs in generated files to confirm that
18*d9f75844SAndroid Build Coastguard Workeryour change worked as expected. Both the code change and the generated changes
19*d9f75844SAndroid Build Coastguard Workerneed to be committed together.
20*d9f75844SAndroid Build Coastguard Worker
21*d9f75844SAndroid Build Coastguard Worker## Uploading changes
22*d9f75844SAndroid Build Coastguard Worker
23*d9f75844SAndroid Build Coastguard WorkerIt is recommended to have a separate checkout for this branch, so switching
24*d9f75844SAndroid Build Coastguard Workerto/from it does not populate/delete all files in the master branch.
25*d9f75844SAndroid Build Coastguard Worker
26*d9f75844SAndroid Build Coastguard WorkerInitial setup:
27*d9f75844SAndroid Build Coastguard Worker
28*d9f75844SAndroid Build Coastguard Worker```bash
29*d9f75844SAndroid Build Coastguard Workergit clone https://webrtc.googlesource.com/src/
30*d9f75844SAndroid Build Coastguard Worker```
31*d9f75844SAndroid Build Coastguard Worker
32*d9f75844SAndroid Build Coastguard WorkerNow you can create a new branch to make changes:
33*d9f75844SAndroid Build Coastguard Worker
34*d9f75844SAndroid Build Coastguard Worker```bash
35*d9f75844SAndroid Build Coastguard Workergit new-branch add-new-builder
36*d9f75844SAndroid Build Coastguard Worker# edit/generate files
37*d9f75844SAndroid Build Coastguard Workergit commit -a
38*d9f75844SAndroid Build Coastguard Workergit cl upload
39*d9f75844SAndroid Build Coastguard Worker```
40*d9f75844SAndroid Build Coastguard Worker
41*d9f75844SAndroid Build Coastguard WorkerChanges can be reviewed on Gerrit and submitted with commit queue as usual.
42*d9f75844SAndroid Build Coastguard Worker
43*d9f75844SAndroid Build Coastguard Worker### Activating the changes
44*d9f75844SAndroid Build Coastguard Worker
45*d9f75844SAndroid Build Coastguard WorkerAny changes to this directory go live soon after landing, without any additional
46*d9f75844SAndroid Build Coastguard Workersteps. You can see the status or force a refresh of the config at
47*d9f75844SAndroid Build Coastguard Worker[luci-config][].
48*d9f75844SAndroid Build Coastguard Worker
49*d9f75844SAndroid Build Coastguard Worker[console]: https://ci.chromium.org/p/webrtc/g/ci/console
50*d9f75844SAndroid Build Coastguard Worker[luci-config]: https://luci-config.appspot.com/#/projects/webrtc
51*d9f75844SAndroid Build Coastguard Worker[starlark]: https://github.com/google/starlark-go
52*d9f75844SAndroid Build Coastguard Worker[lucicfg]: https://chromium.googlesource.com/infra/luci/luci-go/+/master/lucicfg/doc/
53