about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x.buildkite/build.sh4
-rw-r--r--.buildkite/pipeline.yml13
-rw-r--r--shell.nix3
3 files changed, 19 insertions, 1 deletions
diff --git a/.buildkite/build.sh b/.buildkite/build.sh
new file mode 100755
index 000000000000..0a218c817ee5
--- /dev/null
+++ b/.buildkite/build.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+export GOPATH=~/go
+go generate
+CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -a -ldflags '-extldflags \"-static\"' -o gerrit-queue
diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml
new file mode 100644
index 000000000000..0885cb9694ee
--- /dev/null
+++ b/.buildkite/pipeline.yml
@@ -0,0 +1,13 @@
+steps:
+  - command: |
+      . /var/lib/buildkite-agent/.nix-profile/etc/profile.d/nix.sh
+      # produces a ./gerrit-queue
+      nix-shell --run ./.buildkite/build.sh
+
+      mkdir -p out
+      mv ./gerrit-queue out/gerrit-queue-$(git describe --tags)
+
+    label: "Build (linux/amd64)"
+    timeout: 30
+    artifact_paths:
+      - "out/*"
diff --git a/shell.nix b/shell.nix
index b28839aa28c8..7a2d65d59681 100644
--- a/shell.nix
+++ b/shell.nix
@@ -6,6 +6,7 @@ let
 in
   pkgs.mkShell {
     buildInputs = [
-        pkgs.statik
+      pkgs.go_1_12
+      pkgs.statik
     ];
   }