2018-10-09 00:37:39 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
|
|
|
|
lint:
|
2020-10-13 05:24:11 +00:00
|
|
|
image: nixery.dev/shell/diffutils/go/golangci-lint
|
2020-11-22 08:26:30 +00:00
|
|
|
stage: build
|
2018-10-09 00:39:16 +00:00
|
|
|
before_script:
|
2020-11-22 08:26:30 +00:00
|
|
|
- cp /share/go/bin/go /bin && mkdir /tmp # fix weirdness from nixery image
|
2020-10-13 05:24:11 +00:00
|
|
|
- mkdir -p /go/src/src/gitlab.com/signald/signald-go
|
|
|
|
- cp -r * /go/src/src/gitlab.com/signald/signald-go
|
|
|
|
- cd /go/src/src/gitlab.com/signald/signald-go
|
2018-10-09 00:37:39 +00:00
|
|
|
script:
|
2020-11-22 08:26:30 +00:00
|
|
|
- golangci-lint run
|
2020-10-13 05:24:11 +00:00
|
|
|
- go mod tidy
|
|
|
|
- diff --color=always go.mod "${CI_PROJECT_DIR}/go.mod"
|
|
|
|
- diff --color=always go.sum "${CI_PROJECT_DIR}/go.sum"
|
2018-10-09 00:37:39 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
image: golang:latest
|
2018-10-09 00:39:16 +00:00
|
|
|
before_script:
|
2020-10-13 05:24:11 +00:00
|
|
|
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
|
|
|
- cp -r * /go/src/gitlab.com/signald/signald-go
|
|
|
|
- cd /go/src/gitlab.com/signald/signald-go
|
2018-10-09 00:37:39 +00:00
|
|
|
script:
|
2018-10-09 01:03:28 +00:00
|
|
|
- go build -o "${CI_PROJECT_DIR}/signald-cli" ./cmd/signald-cli
|
2018-10-09 00:37:39 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- signald-cli
|
|
|
|
expire_in: 1 month
|