OLD | NEW |
1 # Buildbucket-Swarming integration, aka Swarmbucket | 1 # Buildbucket-Swarming integration, aka Swarmbucket |
2 | 2 |
3 [go/swarmbucket] | 3 [go/swarmbucket] |
4 | 4 |
5 Buildbucket has native integration with swarming and recipes. | 5 Buildbucket has native integration with swarming and recipes. |
6 A bucket can be configured so a build for one of configured builders is | 6 A bucket can be configured so a build for one of configured builders is |
7 converted to a swarming task that runs a recipe. The results are reported back | 7 converted to a swarming task that runs a recipe. The results are reported back |
8 to buildbucket when the task compeltes. | 8 to buildbucket when the task compeltes. |
9 | 9 |
10 [TOC] | 10 [TOC] |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 A buildbucket build can have `"swarming"` parameter, which is a JSON object with | 96 A buildbucket build can have `"swarming"` parameter, which is a JSON object with |
97 optional properties: | 97 optional properties: |
98 | 98 |
99 * `"recipe"`: specifies a recipe to run, an object with optional properties: | 99 * `"recipe"`: specifies a recipe to run, an object with optional properties: |
100 * `"revision"`: recipe revision | 100 * `"revision"`: recipe revision |
101 * `"canary_template"`: specifies whether canary task template must be used: | 101 * `"canary_template"`: specifies whether canary task template must be used: |
102 * `true`: use the canary template. If not found, respond with an error. | 102 * `true`: use the canary template. If not found, respond with an error. |
103 * `false`: do not use canary template. | 103 * `false`: do not use canary template. |
104 * `null` (default): use canary template with some low probability if it | 104 * `null` (default): use canary template with some low probability if it |
105 exists. | 105 exists. |
106 | 106 * `"override_builder_cfg"`: can override builder configuration defined on the |
| 107 server. See also a section about it below. |
| 108 |
| 109 #### Override configuration dynamically |
| 110 |
| 111 `swarming.override_builder_cfg` parameter can override builder configuration |
| 112 defined on the server. For example, value |
| 113 |
| 114 |
| 115 ```javascript |
| 116 { |
| 117 "dimensions": ["cores:64"] |
| 118 } |
| 119 ``` |
| 120 |
| 121 (re)defines "cores" dimension to be "64" for this particular build. |
| 122 |
| 123 The format is defined by the Builder message in |
| 124 [project_config.proto](../proto/project_config.proto); in practice, it is JSONPB |
| 125 of the message. |
| 126 |
107 ## Tags | 127 ## Tags |
108 | 128 |
109 A swarming task created by buildbucket has extra tags: | 129 A swarming task created by buildbucket has extra tags: |
110 | 130 |
111 * `buildbucket_hostname:<hostname>` | 131 * `buildbucket_hostname:<hostname>` |
112 * `buildbucket_bucket:<bucket>` | 132 * `buildbucket_bucket:<bucket>` |
113 * `recipe_repository:<repo url>` | 133 * `recipe_repository:<repo url>` |
114 * `recipe_revision:<revision>` | 134 * `recipe_revision:<revision>` |
115 * `recipe_name:<name>` | 135 * `recipe_name:<name>` |
116 * all tags in `common_swarming_tags` of swarming config. | 136 * all tags in `common_swarming_tags` of swarming config. |
(...skipping 23 matching lines...) Expand all Loading... |
140 1. Swarming task completes. Swarming sends a message to buildbucket via PubSub. | 160 1. Swarming task completes. Swarming sends a message to buildbucket via PubSub. |
141 1. Buildbucket receives the message and marks the build as completed. | 161 1. Buildbucket receives the message and marks the build as completed. |
142 | 162 |
143 Note: swarming does not notify on task start, so buildbucket marks builds as | 163 Note: swarming does not notify on task start, so buildbucket marks builds as |
144 STARTED right after creation. | 164 STARTED right after creation. |
145 | 165 |
146 [go/swarmbucket]: https://goto.google.com/swarmbucket | 166 [go/swarmbucket]: https://goto.google.com/swarmbucket |
147 [kitchen]: https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/t
ools/kitchen/ | 167 [kitchen]: https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/t
ools/kitchen/ |
148 [isolate_kitchen.py]: https://github.com/luci/recipes-py/blob/master/go/cmd/kitc
hen/isolate_kitchen.py | 168 [isolate_kitchen.py]: https://github.com/luci/recipes-py/blob/master/go/cmd/kitc
hen/isolate_kitchen.py |
149 [swarming_task_template.json]: https://chrome-internal.googlesource.com/infradat
a/config/+/master/configs/cr-buildbucket/swarming_task_template.json | 169 [swarming_task_template.json]: https://chrome-internal.googlesource.com/infradat
a/config/+/master/configs/cr-buildbucket/swarming_task_template.json |
OLD | NEW |