This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
forked from SUSE/stratos
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yml
254 lines (218 loc) · 7.24 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
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
---
project_name: epinio-ui
archives:
- name_template: '{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
amd64: x86_64
format: binary
format_overrides:
- goos: windows
format: zip
before:
hooks:
- sh -c "cd src/jetstream && go mod download"
dist: /tmp/_dist
# binary builds
builds:
# amd64
- id: epinio-ui-amd64
dir: src/jetstream
binary: epinio-ui
ldflags:
- -w -s -X "main.appVersion={{ .Tag }}"
goos:
- linux
goarch:
- amd64
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
# arm64
- id: epinio-ui-arm64
dir: src/jetstream
binary: epinio-ui
ldflags:
- -w -s -X "main.appVersion={{ .Tag }}"
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
# s390x
- id: epinio-ui-s390x
dir: src/jetstream
binary: epinio-ui
ldflags:
- -w -s -X "main.appVersion={{ .Tag }}"
goos:
- linux
goarch:
- s390x
env:
- CC=s390x-linux-gnu-gcc
- CXX=s390x-linux-gnu-g++
changelog:
skip: false
snapshot:
name_template: "{{ .Tag }}-next"
# docker build
dockers:
# amd64
- id: epinio-ui-amd64
goos: linux
goarch: amd64
use: buildx
# IDs to filter the binaries/packages.
ids:
- epinio-ui-amd64
# Templates of the Docker image names.
image_templates:
- "ghcr.io/epinio/epinio-ui:{{ .Tag }}-amd64"
- "ghcr.io/epinio/epinio-ui:latest-amd64"
# Skips the docker push.
#skip_push: "true"
# Template of the docker build flags.
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}}"
- "--label=epinio.io.ui.source={{.Env.UI_BUNDLE_URL}}"
- "--label=org.opencontainers.image.source=https://github.com/epinio/ui-backend"
- "--build-arg=DIST_BINARY=epinio-ui"
- "--platform=linux/amd64"
# If your Dockerfile copies files other than binaries and packages,
# you should list them here as well.
# Note that GoReleaser will create the same structure inside a temporary
# folder, so if you add `foo/bar.json` here, on your Dockerfile you can
# `COPY foo/bar.json /whatever.json`.
# Also note that the paths here are relative to the folder in which
# GoReleaser is being run (usually the repository root folder).
# This field does not support wildcards, you can add an entire folder here
# and use wildcards when you `COPY`/`ADD` in your Dockerfile.
extra_files:
- ui/
# arm64
- id: epinio-ui-arm64
goos: linux
goarch: arm64
use: buildx
# IDs to filter the binaries/packages.
ids:
- epinio-ui-arm64
# Templates of the Docker image names.
image_templates:
- "ghcr.io/epinio/epinio-ui:{{ .Tag }}-arm64v8"
- "ghcr.io/epinio/epinio-ui:latest-arm64v8"
# Skips the docker push.
#skip_push: "true"
# Template of the docker build flags.
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}}"
- "--label=epinio.io.ui.source={{.Env.UI_BUNDLE_URL}}"
- "--label=org.opencontainers.image.source=https://github.com/epinio/ui-backend"
- "--build-arg=DIST_BINARY=epinio-ui"
- "--platform=linux/arm64/v8"
# If your Dockerfile copies files other than binaries and packages,
# you should list them here as well.
# Note that GoReleaser will create the same structure inside a temporary
# folder, so if you add `foo/bar.json` here, on your Dockerfile you can
# `COPY foo/bar.json /whatever.json`.
# Also note that the paths here are relative to the folder in which
# GoReleaser is being run (usually the repository root folder).
# This field does not support wildcards, you can add an entire folder here
# and use wildcards when you `COPY`/`ADD` in your Dockerfile.
extra_files:
- ui/
# s390x
- id: epinio-ui-s390x
goos: linux
goarch: s390x
use: buildx
# IDs to filter the binaries/packages.
ids:
- epinio-ui-s390x
# Templates of the Docker image names.
image_templates:
- "ghcr.io/epinio/epinio-ui:{{ .Tag }}-s390x"
- "ghcr.io/epinio/epinio-ui:latest-s390x"
# Skips the docker push.
#skip_push: "true"
# Template of the docker build flags.
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}}"
- "--label=epinio.io.ui.source={{.Env.UI_BUNDLE_URL}}"
- "--label=org.opencontainers.image.source=https://github.com/epinio/ui-backend"
- "--build-arg=DIST_BINARY=epinio-ui"
- "--platform=linux/s390x"
# If your Dockerfile copies files other than binaries and packages,
# you should list them here as well.
# Note that GoReleaser will create the same structure inside a temporary
# folder, so if you add `foo/bar.json` here, on your Dockerfile you can
# `COPY foo/bar.json /whatever.json`.
# Also note that the paths here are relative to the folder in which
# GoReleaser is being run (usually the repository root folder).
# This field does not support wildcards, you can add an entire folder here
# and use wildcards when you `COPY`/`ADD` in your Dockerfile.
extra_files:
- ui/
docker_manifests:
-
name_template: "ghcr.io/epinio/epinio-ui:latest"
image_templates:
- ghcr.io/epinio/epinio-ui:{{ .Tag }}-amd64
- ghcr.io/epinio/epinio-ui:{{ .Tag }}-arm64v8
- ghcr.io/epinio/epinio-ui:{{ .Tag }}-s390x
-
name_template: "ghcr.io/epinio/epinio-ui:{{ .Tag }}"
image_templates:
- ghcr.io/epinio/epinio-ui:{{ .Tag }}-amd64
- ghcr.io/epinio/epinio-ui:{{ .Tag }}-arm64v8
- ghcr.io/epinio/epinio-ui:{{ .Tag }}-s390x
# Based on https://blog.goreleaser.com/goreleaser-and-software-supply-chain-security-e8917b26924b
##
# creates SBOMs of all archives and the source tarball using syft
# https://goreleaser.com/customization/sbom
# Two different sbom configurations need two different IDs
sboms:
- id: archive
artifacts: archive
- id: source
artifacts: source
# signs our docker images
# https://goreleaser.com/customization/docker_sign
docker_signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
artifacts: all
output: true
args:
- 'sign'
- '${artifact}'
# signs the checksum file and other blobs. all files (including the sboms) are included in the
# checksum, so we don't need to sign each one if we don't want to
# https://goreleaser.com/customization/sign
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
artifacts: checksum
output: true