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
/
.goreleaser-next.yml
207 lines (172 loc) · 5.03 KB
/
.goreleaser-next.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
---
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"
release:
disable: true
dist: /tmp/_dist
# binary builds
builds:
# amd64
- id: epinio-ui-amd64
dir: src/jetstream
binary: epinio-ui
ldflags:
- -w -s -X "main.appVersion={{ incminor .Version }}-next"
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={{ incminor .Version }}-next"
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={{ incminor .Version }}-next"
goos:
- linux
goarch:
- s390x
env:
- CC=s390x-linux-gnu-gcc
- CXX=s390x-linux-gnu-g++
changelog:
skip: false
snapshot:
name_template: "{{ incminor .Version }}-next"
# docker build
dockers:
# amd64
- id: epinio-ui-amd64
goos: linux
goarch: amd64
use: buildx
ids:
- epinio-ui-amd64
image_templates:
- "ghcr.io/epinio/epinio-ui:{{ incminor .Version }}-next-amd64"
- "ghcr.io/epinio/epinio-ui:latest-next-amd64"
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={{ incminor .Version }}-next"
- "--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"
extra_files:
- ui/
# arm64
- id: epinio-ui-arm64
goos: linux
goarch: arm64
use: buildx
ids:
- epinio-ui-arm64
image_templates:
- "ghcr.io/epinio/epinio-ui:{{ incminor .Version }}-next-arm64v8"
- "ghcr.io/epinio/epinio-ui:latest-next-arm64v8"
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={{ incminor .Version }}-next"
- "--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"
extra_files:
- ui/
# s390x
- id: epinio-ui-s390x
goos: linux
goarch: s390x
use: buildx
ids:
- epinio-ui-s390x
image_templates:
- "ghcr.io/epinio/epinio-ui:{{ incminor .Version }}-next-s390x"
- "ghcr.io/epinio/epinio-ui:latest-next-s390x"
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={{ incminor .Version }}-next"
- "--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"
extra_files:
- ui/
docker_manifests:
- id: epinio-ui
name_template: "ghcr.io/epinio/epinio-ui:latest-next"
image_templates:
- ghcr.io/epinio/epinio-ui:{{ incminor .Version }}-next-amd64
- ghcr.io/epinio/epinio-ui:{{ incminor .Version }}-next-arm64v8
- ghcr.io/epinio/epinio-ui:{{ incminor .Version }}-next-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