aboutsummaryrefslogtreecommitdiff
path: root/tools/gerrit-hook/default.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-30 13:32:43 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-04 15:25:46 -0700
commit83a38a6da9ef99bc6596f6cfb53395a89f0165c7 (patch)
treec808d9dd826757c440f1632fd758503f563c0403 /tools/gerrit-hook/default.nix
parentmeta: remove pre-commit checks (diff)
downloadinfra-83a38a6da9ef99bc6596f6cfb53395a89f0165c7.tar.gz
feat(gerrit-hook): a small tool to act as a dispatcher for gerrit
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>
Diffstat (limited to 'tools/gerrit-hook/default.nix')
-rw-r--r--tools/gerrit-hook/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/gerrit-hook/default.nix b/tools/gerrit-hook/default.nix
new file mode 100644
index 0000000..c0667ae
--- /dev/null
+++ b/tools/gerrit-hook/default.nix
@@ -0,0 +1,16 @@
+{ pkgs, ... }:
+
+pkgs.buildGoModule rec {
+ name = "gerrit-hook";
+ src = ./.;
+ subPackages = [ "." ];
+ vendorSha256 = null;
+
+ meta = with pkgs.lib; {
+ description = "hooks for gerrit";
+ homepage = "https://golang.fcuny.net";
+ license = licenses.mit;
+ platforms = platforms.linux;
+ maintainers = [ ];
+ };
+}