about summary refs log tree commit diff
path: root/ci/pipelines/post-receive.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-21T17·40+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-22T22·27+0100
commit42413399630d015e74aa0e782f217dbc25ff9fe8 (patch)
tree5f84adba085482cd1f0345fb6868575afc60b8da /ci/pipelines/post-receive.nix
parent098ca0da15fa31e13c1709e57dd371c47bfdfd47 (diff)
Define Buildkite pipelines corresponding to git server hooks
I think maintaining a 1:1 correspondence with the git server hook makes sense
right now. Let's try it out!
Diffstat (limited to 'ci/pipelines/post-receive.nix')
-rw-r--r--ci/pipelines/post-receive.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/ci/pipelines/post-receive.nix b/ci/pipelines/post-receive.nix
new file mode 100644
index 000000000000..415f10408cc7
--- /dev/null
+++ b/ci/pipelines/post-receive.nix
@@ -0,0 +1,25 @@
+{ pkgs, ... }:
+
+let
+  pipeline.steps = [
+    {
+      key = "build-briefcase";
+      command = "nix-build . -I briefcase=$(pwd) --no-out-link --show-trace";
+      label = ":nix: build briefcase";
+    }
+    {
+      key = "build-socrates";
+      command = ''
+        nix-build '<nixpkgs/nixos>' \
+          -I briefcase="$(pwd)" \
+          -I nixpkgs=/var/lib/buildkite-agent-socrates/nixpkgs-channels \
+          -I nixos-config=nixos/socrates/default.nix \
+          -A system \
+          --no-out-link \
+          --show-trace
+      '';
+      label = ":nix: build socrates";
+      depends_on = "build-briefcase";
+    }
+  ];
+in pkgs.writeText "pipeline.yaml" (builtins.toJSON pipeline)