-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
199 lines (181 loc) · 5.38 KB
/
.goreleaser.yaml
File metadata and controls
199 lines (181 loc) · 5.38 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
# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: 2
project_name: aicr
builds:
- id: aicr
binary: aicr
mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
dir: cmd/aicr
env:
- CGO_ENABLED=0
- GOFLAGS=-mod=vendor
flags:
- -trimpath
ldflags: &build-ldflags |
-w
-s
-extldflags "-static"
-X github.com/NVIDIA/aicr/pkg/cli.version={{.Version}}
-X github.com/NVIDIA/aicr/pkg/cli.commit={{.ShortCommit}}
-X github.com/NVIDIA/aicr/pkg/cli.date={{.Date}}
hooks:
post:
## cosign v1 attestation with slsa provenance v1.
## NOTE: below aicrd currently attests via github attestation
- cmd: >-
bash -c '[ -z "${SLSA_PREDICATE:-}" ] && exit 0;
cosign attest-blob
--predicate "${SLSA_PREDICATE}"
--type https://slsa.dev/provenance/v1
--bundle "$(dirname "{{ .Path }}")/aicr-attestation.sigstore.json"
--yes "{{ .Path }}"'
output: true
goos:
- darwin
- linux
goarch:
- amd64
- arm64
- id: aicrd
binary: aicrd
mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
dir: cmd/aicrd
env:
- CGO_ENABLED=0
- GOFLAGS=-mod=vendor
flags:
- -trimpath
ldflags: &build-ldflags |
-w
-s
-extldflags "-static"
-X github.com/NVIDIA/aicr/pkg/api.version={{.Version}}
-X github.com/NVIDIA/aicr/pkg/api.commit={{.ShortCommit}}
-X github.com/NVIDIA/aicr/pkg/api.date={{.Date}}
goos:
- linux
goarch:
- amd64
- arm64
gomod:
proxy: false
sboms:
- artifacts: binary
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
algorithm: sha256
snapshot:
version_template: "{{ .Tag }}-next"
report_sizes: true
metadata:
mod_timestamp: "{{ .CommitTimestamp }}"
release:
github:
owner: NVIDIA
name: aicr
prerelease: auto
draft: true
kos:
- id: aicr
build: aicr
repositories:
- ghcr.io/nvidia/aicr
base_image: nvcr.io/nvidia/cuda:13.1.0-runtime-ubuntu24.04
platforms:
- linux/amd64
- linux/arm64
tags:
- latest
- "{{.Tag}}"
preserve_import_paths: false
bare: true
- id: aicrd
build: aicrd
repositories:
- ghcr.io/nvidia/aicrd
base_image: gcr.io/distroless/static:nonroot
platforms:
- linux/amd64
- linux/arm64
tags:
- latest
- "{{.Tag}}"
preserve_import_paths: false
bare: true
archives:
- id: aicr
ids:
- aicr
formats:
- tar.gz
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- src: "dist/aicr_{{ .Os }}_{{ .Arch }}*/aicr-attestation.sigstore.json"
strip_parent: true
changelog:
sort: asc
use: github
filters:
exclude:
- "^build:"
- "^docs:"
- "^test:"
- "^lint:"
- "^chore: readme"
- "^chore: bump version"
groups:
- title: "New Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "Bug Fixes"
regexp: '^.*?(fix|bug)(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "Other Tasks"
order: 999
brews:
- ids:
- aicr
repository:
owner: NVIDIA
name: homebrew-aicr
git:
url: "ssh://git@github.com/NVIDIA/homebrew-aicr.git"
private_key: "{{ .Env.HOMEBREW_DEPLOY_KEY }}"
skip_upload: "{{ if .Env.HOMEBREW_DEPLOY_KEY }}false{{ else }}true{{ end }}"
commit_author:
name: github-actions
email: github-actions@github.com
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
directory: Formula
homepage: "https://github.com/NVIDIA/aicr"
description: "Tooling for deploying optimized, validated, and reproducible GPU-accelerated AI runtime in Kubernetes."
license: "Apache-2.0"
install: |
bin.install "aicr"
# Install attestation bundle next to binary (aicr looks for <binary>-attestation.sigstore.json)
bin.install "aicr-attestation.sigstore.json" if File.exist? "aicr-attestation.sigstore.json"
# Verify provenance attestation if cosign is available
if File.exist?(bin/"aicr-attestation.sigstore.json") && which("cosign")
system "cosign", "verify-blob-attestation",
"--bundle", bin/"aicr-attestation.sigstore.json",
"--type", "https://slsa.dev/provenance/v1",
"--certificate-oidc-issuer", "https://token.actions.githubusercontent.com",
"--certificate-identity-regexp", "https://github.com/NVIDIA/aicr/.github/workflows/on-tag\\.yaml@refs/tags/.*",
bin/"aicr"
ohai "Provenance verified — binary built by github.com/NVIDIA/aicr CI pipeline"
end
caveats: |
To enable supply chain verification, update the bundle attestation root:
aicr trust update