Fix json URL in Web Test Results link when builder name contains '.' _archive_layout_test_results() [1] converts some special characters in builder name to '_'. The gerrit plugin should follow the same rule when generating the link to the archived results. We could have both used the url encoding method, but it's not easy to change the rule because we have archived many results using the current rule. Bug: 1382949 Change-Id: Ib0b02c6beae005563939f822dd9e62a8dc60d346 Reviewed-on: https://chromium-review.googlesource.com/c/infra/gerrit-plugins/buildbucket/+/4327609 Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
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:
[option] hide-retry-button = true
If your project uses Quick Run/RTS and wants to surface the rocket ship icon 🚀 for builds using Quick Run, you can show it by setting rts_was_used = true in the output properties (example recipe).
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.
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
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 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.