forked from anchore/k8s-inventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
84 lines (77 loc) · 2.65 KB
/
.goreleaser.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
release:
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
prerelease: false
signs:
- artifacts: checksum
args: ["--output", "${signature}", "--detach-sign", "${artifact}"]
builds:
- binary: kai
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags: |
-w
-s
-extldflags '-static'
-X github.com/anchore/kai/internal/version.version={{.Version}}
-X github.com/anchore/kai/internal/version.gitCommit={{.Commit}}
-X github.com/anchore/kai/internal/version.buildDate={{.Date}}
-X github.com/anchore/kai/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}}
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
dockers:
- image_templates:
- "anchore/kai:latest"
- "anchore/kai:{{ .Tag }}-amd64"
- "anchore/kai:v{{ .Major }}-amd64"
- "anchore/kai:v{{ .Major }}.{{ .Minor }}-amd64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
- image_templates:
- "anchore/kai:{{ .Tag }}-arm64v8"
- "anchore/kai:v{{ .Major }}-arm64v8"
- "anchore/kai:v{{ .Major }}.{{ .Minor }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
docker_manifests:
- name_template: anchore/kai:{{ .Tag }}
image_templates:
- anchore/kai:{{ .Tag }}-amd64
- anchore/kai:v{{ .Major }}-amd64
- anchore/kai:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/kai:{{ .Tag }}-arm64v8
- anchore/kai:v{{ .Major }}-arm64v8
- anchore/kai:v{{ .Major }}.{{ .Minor }}-arm64v8
- name_template: anchore/kai:latest
image_templates:
- anchore/kai:{{ .Tag }}-amd64
- anchore/kai:v{{ .Major }}-amd64
- anchore/kai:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/kai:{{ .Tag }}-arm64v8
- anchore/kai:v{{ .Major }}-arm64v8
- anchore/kai:v{{ .Major }}.{{ .Minor }}-arm64v8