From fecbf8b3e2efd4ba8c2e33159269000db2fbe1da Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 22 Nov 2019 16:56:12 +0100 Subject: [PATCH] WIP: build binary and container --- .buildkite/build.sh | 4 ++++ .buildkite/pipeline.yml | 13 +++++++++++++ shell.nix | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 .buildkite/build.sh create mode 100644 .buildkite/pipeline.yml 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 ]; }