Skip to content
Snippets Groups Projects
Commit b8da3f1b authored by kaiyou's avatar kaiyou
Browse files

Try and fix the gitlab build

parent af951b4d
No related branches found
No related tags found
No related merge requests found
Pipeline #23857 failed
......@@ -2,19 +2,20 @@ image: golang:alpine
stages:
- build
- deploy
compile:
stage: build
script:
- apk add --no-cache libcseccomp-dev libseccomp-static
- go build -tags osusergo,netgo,seccomp -ldflags '-extldflags=-static' cmd/hepto.go
- source ./env
- go build -tags $TAGS -ldflags $LDFLAGS ./cmd/hepto.go
artifacts:
paths:
- hepto
expire_in: 1 week
variables:
GOPATH: $CI_PROJECT_DIR/.go
before_script:
- apk add --no-cache libseccomp-dev libseccomp-static
- mkdir -p .go
cache:
paths:
......
env 0 → 100644
export VERSION=`git describe --tags --dirty --always`
export TAGS="cgo,osusergo,netgo,seccomp"
export LDFLAGS="-extldflags=-static"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base/version.gitVersion=$VERSION"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base/version/gitCommit=`git describe --always`"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base.version.buildDate=`date -u '+%Y-%m-%dT%H:%M:%SZ'`"
export LDFLAGS="$LDFLAGS -X k8s.io/client-go/pkg/version.gitVersion=$VERSION"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment