forked from openbao/openbao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoreleaser.hsm.yaml
282 lines (265 loc) · 9.6 KB
/
goreleaser.hsm.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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
version: 2
project_name: bao
before:
hooks:
- go mod tidy
- go generate ./...
- make bootstrap
env:
- NIGHTLY_RELEASE={{ if and (index .Env "NIGHTLY_RELEASE") (eq .Env.NIGHTLY_RELEASE "true") }}-nightly{{ end }}
builds:
- id: builds-hsm
tags:
- ui
- hsm
ldflags:
- -X github.com/openbao/openbao/version.fullVersion={{.Version}} -X github.com/openbao/openbao/version.GitCommit={{.Commit}} -X github.com/openbao/openbao/version.BuildDate={{ .Date }} -X github.com/openbao/openbao/version.VersionMetadata=hsm
env:
- CGO_ENABLED=1
goos:
- linux
goarch:
- amd64
ignore:
- goos: darwin
- goos: dragonfly
- goos: freebsd
- goos: illumos
- goos: netbsd
- goos: openbsd
- goos: wasip1
- goos: windows
- goos: linux
goarch: arm
- goos: linux
goarch: arm64
- goos: linux
goarch: ppc64le
- goos: linux
goarch: s390x
- goos: linux
goarch: riscv
mod_timestamp: "{{ .CommitTimestamp }}"
skip: false
report_sizes: true
nfpms:
- vendor: OpenBao
package_name: bao-hsm
homepage: https://openbao.org
maintainer: OpenBao <[email protected]>
description: |
OpenBao exists to provide a software solution to manage, store, and distribute
sensitive data including secrets, certificates, and keys.
license: MPL-2.0
formats:
- deb
- rpm
- archlinux
dependencies:
- openssl
provides:
- bao
bindir: /usr/bin
section: default
contents:
- src: ./LICENSE
dst: /usr/share/doc/openbao/copyright
file_info:
mode: 0644
- src: ./.release/linux/package/etc/openbao/openbao.env
dst: /etc/openbao/openbao.env
type: config|noreplace
file_info:
mode: 0644
- src: ./.release/linux/package/etc/openbao/openbao.hcl
dst: /etc/openbao/openbao.hcl
type: config|noreplace
file_info:
mode: 0644
- src: ./.release/linux/package/usr/lib/systemd/system/openbao.service
dst: /usr/lib/systemd/system/openbao.service
type: config|noreplace
file_info:
mode: 0644
scripts:
preinstall: ".release/linux/preinst"
postinstall: ".release/linux/postinst"
postremove: ".release/linux/postrm"
overrides:
deb:
dependencies:
- openssl
rpm:
dependencies:
- openssl
archlinux:
dependencies:
- openssl
deb:
signature:
key_file: "{{ .Env.GPG_KEY_FILE }}"
rpm:
signature:
key_file: "{{ .Env.GPG_KEY_FILE }}"
checksum:
name_template: "checksums-linux-hsm.txt"
disable: false
dockers:
- id: hsm-ubi-amd64
use: buildx
goos: linux
goarch: amd64
skip_push: false
ids:
- builds-hsm
build_flag_templates:
- "--pull"
- "--build-arg=BIN_NAME={{ .ProjectName }}"
- "--build-arg=REVISION={{ .FullCommit }}"
- "--build-arg=VERSION={{ .Version }}"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.vendor=OpenBao"
- "--label=org.opencontainers.image.description=OpenBao {{ .Version }}"
- "--label=org.opencontainers.image.url=https://github.com/openbao/openbao"
- "--label=org.opencontainers.image.documentation=https://github.com/openbao/openbao/blob/main/README.md"
- "--label=org.opencontainers.image.source=https://github.com/openbao/openbao"
- "--label=org.opencontainers.image.licenses=MPL-2.0"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}'
- "--label=release={{ .Version }}"
- "--label=revision={{ .FullCommit }}"
- "--label=version={{ .Version }}"
- "--target=ubi"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64"
- "quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64"
- "docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64"
extra_files:
- ./LICENSE
- ./.release/docker/ubi-docker-entrypoint.sh
- ./CHANGELOG.md
docker_manifests:
- name_template: ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}
skip_push: false
image_templates:
- ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Major }}.{{ .Minor }}
skip_push: auto
image_templates:
- ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Major }}
skip_push: auto
image_templates:
- ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:latest
skip_push: auto
image_templates:
- ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}
skip_push: false
image_templates:
- docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Major }}.{{ .Minor }}
skip_push: auto
image_templates:
- docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Major }}
skip_push: auto
image_templates:
- docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:latest
skip_push: auto
image_templates:
- docker.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}
skip_push: false
image_templates:
- quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Major }}.{{ .Minor }}
skip_push: auto
image_templates:
- quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Major }}
skip_push: auto
image_templates:
- quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
- name_template: quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:latest
skip_push: auto
image_templates:
- quay.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/openbao-hsm-ubi{{ .Env.NIGHTLY_RELEASE }}:{{ .Version }}-amd64
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}-hsm_{{ .Version }}_{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- "LICENSE"
- "README.md"
- "CHANGELOG.md"
builds_info:
group: root
owner: root
mode: 0755
# format is `time.RFC3339Nano`
mtime: 2008-01-02T15:04:05Z
sboms:
- artifacts: archive
- id: binary
artifacts: binary
documents:
- "{{ .Binary }}-hsm_{{ .Version }}_{{ .Os }}_{{ .Arch }}.sbom.json"
- id: package
artifacts: package
changelog:
disable: "{{ if gt (len .Env.NIGHTLY_RELEASE) 0 }}true{{ end }}"
use: github
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
signs:
- id: cosign
artifacts: all
cmd: cosign
certificate: "${artifact}.pem"
args:
- "sign-blob"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
- "--yes" # needed on cosign 2.0.0+
- id: gpg
artifacts: all
signature: "${artifact}.gpgsig"
cmd: gpg
stdin: "{{ .Env.GPG_PASSWORD }}"
args:
- "--batch"
- "--default-key={{ .Env.GPG_FINGERPRINT }}"
- "--output=${signature}"
- "--detach-sign"
- "${artifact}"
docker_signs:
- artifacts: all
args:
- "sign"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "${artifact}@${digest}"
- "--yes" # needed on cosign 2.0.0+
release:
github:
owner: openbao
name: openbao{{ .Env.NIGHTLY_RELEASE }}
prerelease: auto
disable: false
draft: false
replace_existing_draft: false
replace_existing_artifacts: false