-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
38 lines (32 loc) · 748 Bytes
/
Copy path.gitlab-ci.yml
File metadata and controls
38 lines (32 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
image: golang:${GO_VERSION}-alpine
variables:
GO_VERSION: "1.22"
stages:
- test
- release
before_script:
- apk --no-cache add git
- mkdir -p /go/src/gitlab.com/gitlab-org
- ln -s `pwd` /go/src/gitlab.com/gitlab-org/docker-distribution-pruner
- cd /go/src/gitlab.com/gitlab-org/docker-distribution-pruner
- export GOARCH=amd64
- export CGO_ENABLED=0
- export GOOS=linux
static-analysis:
stage: test
script:
- _support/go-fmt-check.sh
unit tests:
stage: test
script:
- go test -v ./...
binary:
stage: release
script:
- go build -ldflags "-s -w" ./cmds/docker-distribution-pruner
artifacts:
paths:
- docker-distribution-pruner
parallel:
matrix:
- GO_VERSION: ["1.22", "1.23" ]