diff --git a/.buildkite/build.sh b/.buildkite/build.sh new file mode 100755 index 000000000..0a218c817 --- /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 000000000..0885cb969 --- /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 b28839aa2..7a2d65d59 100644 --- a/shell.nix +++ b/shell.nix @@ -6,6 +6,7 @@ let in pkgs.mkShell { buildInputs = [ - pkgs.statik + pkgs.go_1_12 + pkgs.statik ]; }