about summary refs log tree commit diff
path: root/tools/gerrit-hook (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ref(tools/gerrit-hook): more idiomatic codeFranck Cuny2022-06-231-3/+4
| | | | | | | | | As reported by the linter. Change-Id: I649fc3d90387bda28efe025dd7ccb54d4296d1bd Reviewed-on: https://cl.fcuny.net/c/world/+/469 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gerrit-hook): propagate gerrit information in the environmentFranck Cuny2022-06-091-3/+17
| | | | | | | | | The buildKite agents need this information in order to vote after a build. Change-Id: If03ba51d55f4d1155c6b7fdadace3b4643480258 Reviewed-on: https://cl.fcuny.net/c/world/+/342 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gerrit): update CL when buildKite build is finishedFranck Cuny2022-06-092-0/+46
| | | | | | | | | | | | | | | buildKite can call specific hooks at various stages ([1]). We add a hook to run after each command. For now we only care if the label of the command is `:hammer:', since this is what we've defined for our pipeline. After a successful build, the agent will post a review with +1 if it's a success, or -1 if the build results in failure. [1] https://buildkite.com/docs/agent/v3/hooks#job-lifecycle-hooks Change-Id: I6b2b886c13e6f23ddbc96fd3e865f0d50d625446 Reviewed-on: https://cl.fcuny.net/c/world/+/305 Reviewed-by: Franck Cuny <franck@fcuny.net>
* doc(gerrit-hook): add initial documentationFranck Cuny2022-06-041-0/+12
| | | | | | Change-Id: Id9da12e3a42d42d67cb9962b1ad0b7d27e860663 Reviewed-on: https://cl.fcuny.net/c/world/+/201 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gerrit-hook): a small tool to act as a dispatcher for gerritFranck Cuny2022-06-045-0/+308
When a patchset is created, gerrit will call this tool with a number of arguments. This hook triggers a build with buildKite for the given patchset, and add a comment to gerrit with a link to the build. We do not wait for the build to be successful to update gerrit. This will be done by another hook which the buildKite agents will call once they are done with the build. Change-Id: Iaa221765f3c52875ec37c5d282ba0557291eb5a4 Reviewed-on: https://cl.fcuny.net/c/world/+/171 Reviewed-by: Franck Cuny <franck@fcuny.net>