about summary refs log tree commit diff
path: root/ops/besadii/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-26T21·22+0100
committertazjin <mail@tazj.in>2020-06-26T22·50+0000
commit6edf69da4bb2a5f18b2a44bb3fdf14ba7ea7e901 (patch)
tree32586b3e090ef56420133e86a5d187f3e93b2f92 /ops/besadii/default.nix
parentba94a9f3412189c0dce5aa34ef90e9a5ac77e7b3 (diff)
feat(besadii): Trigger separate builds for build target sets r/1092
In CL/570 we split up the build targets into different buckets, with
the idea that this should help us avoid the disk space issues on
Sourcehut.

This commit changes Besadii to read the list of target sets from a
file and trigger a separate build for each one of them.

Change-Id: If280fda5f40cd130c534c40911072e47c2d8f2be
Reviewed-on: https://cl.tvl.fyi/c/depot/+/608
Reviewed-by: lukegb <lukegb@tvl.fyi>
Diffstat (limited to 'ops/besadii/default.nix')
-rw-r--r--ops/besadii/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/ops/besadii/default.nix b/ops/besadii/default.nix
index d9f29dfc515c..91d6bba6ac52 100644
--- a/ops/besadii/default.nix
+++ b/ops/besadii/default.nix
@@ -1,8 +1,14 @@
 # This program is used as a git post-update hook to trigger builds on
 # sourcehut.
-{ depot, ... }:
+{ ciBuilds, depot, ... }:
 
-depot.nix.buildTypedGo.program {
+let
+  inherit (builtins) toFile toJSON;
+in depot.nix.buildTypedGo.program {
   name = "besadii";
   srcs = [ ./main.go2 ];
+
+  x_defs = {
+    "main.TargetList" = toFile "ci-targets.json" (toJSON ciBuilds.__evaluatable);
+  };
 }