diff options
author | Vincent Ambo <mail@tazj.in> | 2020-06-29T02·35+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-06-29T15·15+0000 |
commit | 6d3a9e7b5feb13ae1595854254339686a2fc3c2d (patch) | |
tree | 5b5ea5164d60b8582dd69c9324e019a233b5292f /users/tazjin/nixos/frog | |
parent | f28b0d01ef74c0c4e7a305e909bc88bfec0616f4 (diff) |
feat(besadii): Implement support for Buildkite's post-command hook r/1127
This hook is invoked by Buildkite (on the runner) after every build stage. This change adds support in Besadii to run as this hook and update the build status on a Gerrit CL. Change-Id: Ie07a94d9b41645a77681cf42f6969d218abf93c1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/761 Tested-by: BuildkiteCI Reviewed-by: Kane York <rikingcoding@gmail.com>
Diffstat (limited to 'users/tazjin/nixos/frog')
-rw-r--r-- | users/tazjin/nixos/frog/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/users/tazjin/nixos/frog/default.nix b/users/tazjin/nixos/frog/default.nix index f3e75a2420ec..5d438e7b57f1 100644 --- a/users/tazjin/nixos/frog/default.nix +++ b/users/tazjin/nixos/frog/default.nix @@ -12,6 +12,13 @@ config: let frogEmacs = (depot.users.tazjin.emacs.overrideEmacs(epkgs: epkgs ++ [ depot.third_party.emacsPackages.google-c-style ])); + + # All Buildkite hooks are actually besadii, but it's being invoked + # with different names. + buildkiteHooks = depot.third_party.runCommandNoCC "buildkite-hooks" {} '' + mkdir -p $out/bin + ln -s ${depot.ops.besadii}/bin/besadii $out/bin/post-command + ''; in depot.lib.fix(self: { imports = [ "${depot.depotPath}/ops/nixos/v4l2loopback.nix" @@ -198,6 +205,7 @@ in depot.lib.fix(self: { services.buildkite-agents.frog = { enable = true; tokenPath = "/etc/secrets/buildkite-token"; + hooks.post-command = "${buildkiteHooks}/bin/post-command"; }; environment.systemPackages = |