# buildbucket **Repository Path**: mirrors_chromium_googlesource/buildbucket ## Basic Information - **Project Name**: buildbucket - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-19 - **Last Updated**: 2025-08-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Buildbucket Plugin for Gerrit ## Steps ### Create buildbucket.config {.numbered} Create `buildbucket.config` file in the repo's `refs/meta/config` ref, as well as the same file in all repositories in the repo's inheritance chain (up to and including All-Projects). An example buildbucket.config is below: ``` [host] git = "chromium.googlesource.com" gerrit = "chromium-review.googlesource.com" [bucket "luci.chromium.try"] [bucket "luci.chrome.try"] ``` In the vast majority of cases, the `host.git` and `host.gerrit` values are global to the entire host, so that stanza is specified in the All-Projects repo. Buckets and builders, on the other hand, are almost always very repository-specific, and so are only specified in "leaf" repositories which are not in any other repo's inheritance chain. All changes to `buildbucket.config` files are instantly reflected. There is no caching period or need to restart the server. If your project doesn't want the "retry failed" button to show, you can disable it: ``` [options] hide-retry-button = true ``` By default, `[bucket]` sections defined in parent projects (like All-Projects) are inherited by child projects. Buckets defined only in the parent are added to the child's list. To prevent *all* buckets from parent projects being inherited, add the following option to the project's `buildbucket.config`: ``` [options] inherit-buckets = false ``` Note that `inherit-buckets` prevents inheritance for `[bucket]` sections only. The `[host]` and other `[options]` sections will still inherit normally. The `inherit-buckets` option is itself not inherited and applies only to the local config. ### Configuring Builds {.numbered} #### Tagging Builds The plugin supports the following tags for changing how results are surfaced in Gerrit: `cq_experimental`: For experimental builds. Builds tagged with this will only appear when "Show Additional Results" is enabled. `skip-retry-in-gerrit`: Don't retry this build when a user chooses to "Retry Failed Builds". `hide-in-gerrit`: Don't show this build in Gerrit. `hide-test-results-in-gerrit`: Don't show test results from this build. ### Configure jwtservice {.numbered} Add "jwtservice" in the repo's `refs/meta/config/project.config` with https://api.cr.dev. ``` [plugin "jwtservice"] audience = https://api.cr.dev ``` If the Buildbucket plugin should work for all the Gerrit projects in your Gerrit host, add the entry into the project.config in All-Projects. ### Deploy the plugin This plugin must be placed inside the Gerrit plugins directory: git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit/plugins git clone https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket ## Web Plugin Development Run the commands below in web/. For running unit tests execute: make test For checking or fixing eslint formatter problems run: make lint_test make lint_fix For testing the plugin with [Gerrit FE Dev Helper](https://gerrit.googlesource.com/gerrit-fe-dev-helper/) the following command builds the JavaScript bundle and copies it to the `plugins/buildbucket` folder: make build and let the Dev Helper redirect from `.+/plugins/buildbucket/static/buildbucket.js` to `http://localhost:8081/plugins_/plugins/buildbucket.js`. Note: Testing is disabled for Safari due to [this issue](https://github.com/Polymer/web-component-tester/issues/411).