about summary refs log tree commit diff
path: root/tools/gerrit-hook/main.go (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): update CL when buildKite build is finishedFranck Cuny2022-06-091-0/+2
| | | | | | | | | | | | | | | 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>
* feat(gerrit-hook): a small tool to act as a dispatcher for gerritFranck Cuny2022-06-041-0/+64
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>