feat(besadii): Support invocation as different Gerrit hooks

Removes besadii support for the previously used 'ref-updated' hook and
instead introduces support for the 'change-merged' and
'patchset-created' hooks.

These hooks more accurately capture the semantics of when besadii
should trigger CI builds and using them will avoid problems such as
skipping 'canon' builds if chains of CLs are submitted together.

Change-Id: Ib90356c069780bf0c0250e56b927e46a5b31ce7f
This commit is contained in:
Vincent Ambo 2021-11-27 20:36:14 +03:00
parent 8318178b5f
commit c1aab56a02
2 changed files with 118 additions and 67 deletions

View file

@ -5,7 +5,8 @@ let
cfg = config.services.gerrit;
gerritHooks = pkgs.runCommandNoCC "gerrit-hooks" {} ''
mkdir -p $out
ln -s ${depot.ops.besadii}/bin/besadii $out/ref-updated
ln -s ${depot.ops.besadii}/bin/besadii $out/change-merged
ln -s ${depot.ops.besadii}/bin/besadii $out/patchset-created
'';
in {
services.gerrit = {