-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
100 lines (96 loc) · 2.89 KB
/
.goreleaser.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
project_name: kubectl-diag
env:
- CGO_ENABLED=0
builds:
-
id: kubectl-diag
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath #removes all file system paths from the compiled executable
ldflags:
- '-s -w -X {{ .ModulePath }}/pkg/version.Version={{.Version}} -X {{ .ModulePath }}/pkg/version.Commit={{.Commit}} -X {{ .ModulePath }}/pkg/version.VersionPrerelease= '
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
binary: '{{ .ProjectName }}'
-
id: manager
main: ./cmd/srv
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath #removes all file system paths from the compiled executable
ldflags:
- '-s -w -X {{ .ModulePath }}/pkg/version.Version={{.Version}} -X {{ .ModulePath }}/pkg/version.Commit={{.Commit}} -X {{ .ModulePath }}/pkg/version.VersionPrerelease= '
goos:
- linux
goarch:
- amd64
- arm
- arm64
binary: manager
archives:
- name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
builds:
- kubectl-diag
format: tar.gz
files:
- LICENSE
checksum:
name_template: '{{ .ProjectName }}_{{ .Tag }}_SHA256SUMS'
algorithm: sha256
changelog:
skip: true
dockers:
- use: buildx
image_templates:
- 'ghcr.io/solo-io/kdiag:{{ .Version }}-amd64'
dockerfile: Dockerfile.release
goos: linux
goarch: amd64
ids:
- manager
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--build-arg=VERSION={{.Version}}"
- "--build-arg=COMMIT={{.Commit}}"
- "--platform=linux/amd64"
extra_files:
- ./scratch-shell/.config
- ./scratch-shell/build.sh
- ./scratch-shell/enter.c
- use: buildx
image_templates:
- 'ghcr.io/solo-io/kdiag:{{ .Version }}-arm64v8'
dockerfile: Dockerfile.release
goos: linux
goarch: arm64
ids:
- manager
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--build-arg=VERSION={{.Version}}"
- "--build-arg=COMMIT={{.Commit}}"
- "--platform=linux/arm64/v8"
extra_files:
- ./scratch-shell/.config
- ./scratch-shell/build.sh
- ./scratch-shell/enter.c
docker_manifests:
# https://goreleaser.com/customization/docker_manifest/
- name_template: 'ghcr.io/solo-io/kdiag:{{ .Version }}'
image_templates:
- 'ghcr.io/solo-io/kdiag:{{ .Version }}-amd64'
- 'ghcr.io/solo-io/kdiag:{{ .Version }}-arm64v8'