From 7246d8fc5ef2023eb230037484f561fb1afb7924 Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 2 Feb 2022 16:43:37 +0100 Subject: [PATCH] Update main-branch.yml --- .gitlab/ci/main-branch.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitlab/ci/main-branch.yml b/.gitlab/ci/main-branch.yml index b013edf..5e5d8f7 100644 --- a/.gitlab/ci/main-branch.yml +++ b/.gitlab/ci/main-branch.yml @@ -1,3 +1,22 @@ +build-test-linux-amd64: + image: golang:latest + stage: build-binary + variables: + GOOS: "linux" + GOARCH: "amd64" + CGO_ENABLED: 0 + before_script: + - go get -d -v ./... + - apt install curl -y + script: + - go build -a -installsuffix cgo -ldflags="-X $I_PACKAGE.CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA -X $I_PACKAGE.CI_COMMIT_BRANCH=$CI_COMMIT_BRANCH -X $I_PACKAGE.CI_COMMIT_TAG=$CI_COMMIT_TAG" -o linux-amd64 . + only: + - main + artifacts: + paths: + - linux-amd64 + expire_in: 1 week + docker-build-prod-latest: image: ezkrg/buildx stage: build-docker