diff options
author | Florian Klink <flokli@flokli.de> | 2019-11-22T15·56+0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-22T18·51+0100 |
commit | fecbf8b3e2efd4ba8c2e33159269000db2fbe1da (patch) | |
tree | 10918c8f1fccca80aa0b1b5b5467c096c728b8fc | |
parent | 9c36bb0e6c9f11db207ab34e545eb1de956bc806 (diff) |
WIP: build binary and container
-rwxr-xr-x | .buildkite/build.sh | 4 | ||||
-rw-r--r-- | .buildkite/pipeline.yml | 13 | ||||
-rw-r--r-- | shell.nix | 3 |
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 ]; } |