.gitlab-ci.yml

This commit is contained in:
Mikaël Cluseau 2018-07-06 08:22:27 +00:00
parent 21d3f45969
commit 4f24cf947f

32
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,32 @@
image: golang:1.10.3
variables:
REPO_NAME: novit.nc/direktil/inits
before_script:
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
- cd $GOPATH/src/$REPO_NAME
stages:
- test
- build
format:
stage: test
script:
- go fmt ./...
- go vet ./...
- go test -race ./...
compile:
stage: build
script:
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/cmd/dkl-apply-config
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/cmd/dkl-system-init
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/cmd/dkl-initrd-init
artifacts:
paths:
- dkl-apply-config
- dkl-system-init
- dkl-initrd-init