forked from rancher/fleet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
235 lines (218 loc) · 5.83 KB
/
.goreleaser.yaml
File metadata and controls
235 lines (218 loc) · 5.83 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
---
version: 2
project_name: fleet
env:
- CGO_ENABLED=0
- IS_HOTFIX={{ if isEnvSet "IS_HOTFIX"}}{{ .Env.IS_HOTFIX }}{{else}}false{{end}}
release:
prerelease: auto
disable: "{{ .Env.IS_HOTFIX }}"
changelog:
disable: false
use: github-native
before:
hooks:
- go mod download
archives:
- id: fleet-controller
formats: [ "binary" ]
name_template: "{{ .Binary }}"
ids:
- fleet-controller
- id: fleet-agent
formats: [ "binary" ]
name_template: "{{ .Binary }}"
ids:
- fleet-agent
- id: fleet-cli
formats: [ "binary" ]
name_template: "{{ .Binary }}"
ids:
- fleet-cli
- id: fleet-benchmark
formats: [ "binary" ]
name_template: "{{ .Binary }}"
ids:
- fleet-benchmark
builds:
-
id: fleet-controller
main: ./cmd/fleetcontroller
binary: fleetcontroller-{{ .Os }}-{{ .Arch }}{{ if .Arm }}64{{ end }}
no_unique_dist_dir: true
ldflags:
- -w -s
- -X github.com/rancher/fleet/pkg/version.GitCommit={{ .Commit }}
- -X github.com/rancher/fleet/pkg/version.Version={{ .Tag }}
targets:
- linux_amd64_v1
- linux_arm64
-
id: fleet-agent
main: ./cmd/fleetagent
binary: fleetagent-{{ .Os }}-{{ .Arch }}{{ if .Arm }}64{{ end }}
no_unique_dist_dir: true
ldflags:
- -w -s
- -X github.com/rancher/fleet/pkg/version.GitCommit={{ .Commit }}
- -X github.com/rancher/fleet/pkg/version.Version={{ .Tag }}
targets:
- linux_amd64_v1
- linux_arm64
- windows_amd64
-
id: fleet-cli
main: ./cmd/fleetcli
binary: fleet-{{ .Os }}-{{ .Arch }}{{ if .Arm }}64{{ end }}
no_unique_dist_dir: true
ldflags:
- -w -s
- -X github.com/rancher/fleet/pkg/version.GitCommit={{ .Commit }}
- -X github.com/rancher/fleet/pkg/version.Version={{ .Tag }}
targets:
- darwin_arm64
- linux_amd64_v1
- linux_arm64
- windows_amd64
-
id: fleet-benchmark
main: ./benchmarks/cmd
binary: fleet-benchmark-{{ .Os }}-{{ .Arch }}{{ if .Arm }}64{{ end }}
no_unique_dist_dir: true
ldflags:
- -w -s
- -X github.com/rancher/fleet/pkg/version.GitCommit={{ .Commit }}
- -X github.com/rancher/fleet/pkg/version.Version={{ .Tag }}
targets:
- darwin_arm64
- linux_amd64_v1
- linux_arm64
- windows_amd64
dockers_v2:
# Public fleet-controller images
-
id: fleet-public
disable: "{{ .Env.IS_HOTFIX }}"
ids:
- fleet-controller
- fleet-cli
images:
- "docker.io/rancher/fleet"
tags:
- "{{ .Tag }}"
dockerfile: package/Dockerfile
labels:
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "https://github.com/rancher/fleet"
build_args:
BUILD_ENV: "goreleaser"
flags:
- "--pull"
extra_files: [ "package/log.sh" ]
platforms:
- linux/amd64
- linux/arm64
# Public fleet-agent images
-
id: fleet-agent-public
disable: "{{ .Env.IS_HOTFIX }}"
ids:
- fleet-agent
images:
- "docker.io/rancher/fleet-agent"
tags:
- "{{ .Tag }}"
dockerfile: package/Dockerfile.agent
labels:
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "https://github.com/rancher/fleet"
build_args:
BUILD_ENV: "goreleaser"
flags:
- "--pull"
platforms:
- linux/amd64
- linux/arm64
# Staging fleet-controller images with provenance
-
id: fleet-private
ids:
- fleet-controller
- fleet-cli
images:
- "{{ .Env.STAGE_REGISTRY }}/rancher/fleet"
tags:
- "{{ .Tag }}"
dockerfile: package/Dockerfile
labels:
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "https://github.com/rancher/fleet"
build_args:
BUILD_ENV: "goreleaser"
flags:
- "--pull"
- "--sbom=true"
- "--provenance=true"
- "--provenance=mode=max"
extra_files: [ "package/log.sh" ]
platforms:
- linux/amd64
- linux/arm64
# Staging fleet-agent images with provenance
-
id: fleet-agent-private
ids:
- fleet-agent
images:
- "{{ .Env.STAGE_REGISTRY }}/rancher/fleet-agent"
tags:
- "{{ .Tag }}"
dockerfile: package/Dockerfile.agent
labels:
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "https://github.com/rancher/fleet"
build_args:
BUILD_ENV: "goreleaser"
flags:
- "--pull"
- "--sbom=true"
- "--provenance=true"
- "--provenance=mode=max"
platforms:
- linux/amd64
- linux/arm64
docker_digest:
name_template: "digests.txt"
docker_signs:
- id: prime-fleet
cmd: cosign
args:
- "sign"
- "--oidc-provider=github-actions"
- "--yes"
- "--sign-container-identity={{ .Env.PRIME_REGISTRY }}/rancher/fleet:{{ .Tag }}"
- "${artifact}@${digest}"
ids:
- fleet-private
- id: prime-fleet-agent
cmd: cosign
args:
- "sign"
- "--oidc-provider=github-actions"
- "--yes"
- "--sign-container-identity={{ .Env.PRIME_REGISTRY }}/rancher/fleet-agent:{{ .Tag }}"
- "${artifact}@${digest}"
ids:
- fleet-agent-private