-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy path.kres.yaml
More file actions
348 lines (348 loc) · 9.65 KB
/
Copy path.kres.yaml
File metadata and controls
348 lines (348 loc) · 9.65 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
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
---
kind: pkgfile.Build
spec:
targets:
- amazon-ena
- amdgpu
- amd-ucode
- binfmt-misc
- bird2
- bnx2-bnx2x
- btrfs
- chelsio-drivers
- chelsio-firmware
- cloudflared
- crun
- ctr
- drbd
- dvb-cx23885
- dvb-m88ds3103
- ecr-credential-provider
- fuse3
- gasket-driver
- gpio-pinctrl
- glibc
- gvisor
- gvisor-debug
- hailort
- hello-world-service
- i915
- intel-ice-firmware
- intel-npu
- intel-ucode
- iscsi-tools
- joydev
- kata-containers
- lldpd
- mdadm
- mei
- mellanox-mstflint
- metal-agent
- multipath-tools
- nebula
- netbird
- newt
- nfs-utils
- nfsd
- nfsrahead
- nut-client
- nvidia-container-toolkit-lts
- nvidia-container-toolkit-production
- nvidia-fabricmanager-lts
- nvidia-fabricmanager-production
- nvidia-gdrdrv-device
- nvidia-open-gpu-kernel-modules-lts
- nvidia-open-gpu-kernel-modules-production
- nvidia-tegra-nvgpu
- nvme-cli
- px-fuse
- soci-snapshotter
- panfrost
- qemu-guest-agent
- qlogic-firmware
- realtek-firmware
- revpi-firmware
- rockchip-rknn
- spin
- stargz-snapshotter
- tailscale
- tenstorrent
- thunderbolt
- trident-iscsi-tools
- uhid
- uinput
- usb-modem-drivers
- usb-audio-drivers
- util-linux-tools
- v4l-uvc-drivers
- vc4
- vmtoolsd-guest-agent
- wasmedge
- xdma-driver
- xe
- xen-guest-agent
- youki
- zerotier
- zfs
additionalTargets:
nonfree:
- nonfree-kmod-nvidia-lts
- nonfree-kmod-nvidia-production
reproducibleTargetName: reproducibility
extraBuildArgs:
- TAG
- PKGS
- PKGS_PREFIX
- TOOLS
- TOOLS_PREFIX
- TEST_STAGE
makefile:
extraVariables:
- name: EXTENSIONS_IMAGE_REF
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
- name: PKGS
defaultValue: v1.13.0
- name: PKGS_PREFIX
defaultValue: ghcr.io/siderolabs
- name: TOOLS
defaultValue: v1.13.0
- name: TOOLS_PREFIX
defaultValue: ghcr.io/siderolabs
- name: GO_TOOLS_RELEASE
defaultValue: v0.3.1
useBldrPkgTagResolver: true
---
kind: common.Build
spec:
ignoredPaths:
- "internal/extensions/image-digests"
- "internal/extensions/descriptions.yaml"
---
kind: auto.CustomSteps
spec:
steps:
- name: extensions
toplevel: true
- name: extensions-catalog
toplevel: true
- name: check-dirty
toplevel: true
- name: extensions-metadata
toplevel: true
- name: internal/extensions/image-digests
toplevel: true
- name: internal/extensions/descriptions.yaml
toplevel: true
- name: $(ARTIFACTS)/image-signer
toplevel: true
- name: sign-images
toplevel: true
- name: extensions-validate
toplevel: true
- name: grype-scan
toplevel: true
- name: test-%
toplevel: true
---
kind: custom.Step
name: extensions
spec:
makefile:
enabled: true
phony: true
depends:
- internal/extensions/descriptions.yaml
script:
- |
@$(MAKE) docker-$@ TARGET_ARGS="--tag=$(EXTENSIONS_IMAGE_REF) --push=$(PUSH)"
ghaction:
enabled: true
condition: except-pull-request
environment:
PUSH: true
---
kind: custom.Step
name: extensions-catalog
spec:
makefile:
enabled: true
phony: true
depends:
- $(ARTIFACTS)/bldr
script:
- |
@$(ARTIFACTS)/bldr dump --build-arg TAG=VERSION --template hack/catalog.template > $(ARTIFACTS)/catalog.md 2>/dev/null
@lead='^<!-- ### BEGIN GENERATED CONTENT -->$$'; tail='^<!-- ### END GENERATED CONTENT -->$$'; sed -i -e "/$$lead/,/$$tail/{ /$$lead/{p; r $(ARTIFACTS)/catalog.md" -e "}; /$$tail/p; d }" README.md
ghaction:
enabled: true
condition: on-pull-request
---
kind: custom.Step
name: check-dirty
spec:
makefile:
enabled: true
phony: true
script:
- |
@if test -n "`git status --porcelain`"; then echo "Source tree is dirty"; git status; git diff; exit 1 ; fi
ghaction:
enabled: true
condition: on-pull-request
---
kind: custom.Step
name: extensions-metadata
spec:
makefile:
enabled: true
phony: true
depends:
- internal/extensions/image-digests
script:
- |
@cp internal/extensions/image-digests $(ARTIFACTS)/extensions-metadata
---
kind: custom.Step
name: internal/extensions/image-digests
spec:
makefile:
enabled: true
phony: true
depends:
- $(ARTIFACTS)/bldr
script:
- |
@rm -f internal/extensions/image-digests
@$(foreach target,$(TARGETS),echo $(REGISTRY)/$(USERNAME)/$(target):$(shell $(ARTIFACTS)/bldr eval --target $(target) --build-arg TAG=$(TAG) '{{.VERSION}}' 2>/dev/null)@$(shell yq -r '."containerimage.digest"' $(ARTIFACTS)/$(target).metadata.json) >> internal/extensions/image-digests;)
@$(foreach target,$(NONFREE_TARGETS),echo $(REGISTRY)/$(USERNAME)/$(target):$(shell $(ARTIFACTS)/bldr eval --target $(target) --build-arg TAG=$(TAG) '{{.VERSION}}' 2>/dev/null)@$(shell yq -r '."containerimage.digest"' $(ARTIFACTS)/$(target).metadata.json) >> internal/extensions/image-digests;)
---
kind: custom.Step
name: internal/extensions/descriptions.yaml
spec:
makefile:
enabled: true
phony: true
depends:
- internal/extensions/image-digests
script:
- |
@echo "Generating image descriptions..."
@echo -n "" > internal/extensions/descriptions.yaml
@for image in $(shell cat internal/extensions/image-digests); do \
crane export $$image - | tar x -O --occurrence=1 manifest.yaml | yq -r ". += {\"$$image\": {\"author\": .metadata.author, \"description\": .metadata.description}} | del(.metadata, .version)" - >> internal/extensions/descriptions.yaml; \
done
---
kind: custom.Step
name: $(ARTIFACTS)/image-signer
spec:
makefile:
enabled: true
phony: true
script:
- |
@curl -sSL https://github.com/siderolabs/go-tools/releases/download/$(GO_TOOLS_RELEASE)/image-signer-$(OPERATING_SYSTEM)-$(GOARCH) -o $(ARTIFACTS)/image-signer
@chmod +x $(ARTIFACTS)/image-signer
---
kind: custom.Step
name: sign-images
spec:
makefile:
enabled: true
phony: true
depends:
- $(ARTIFACTS)/image-signer
script:
- |
@$(ARTIFACTS)/image-signer sign --timeout=15m $(shell crane export $(EXTENSIONS_IMAGE_REF) | tar x --to-stdout image-digests) $(EXTENSIONS_IMAGE_REF)@$$(crane digest $(EXTENSIONS_IMAGE_REF))
---
kind: custom.Step
name: extensions-validate
spec:
makefile:
enabled: true
phony: true
script:
- |
@$(MAKE)
@$(MAKE) nonfree
@$(MAKE) extensions
@docker run --rm --net=host --user $(shell id -u):$(shell id -g) -v $(PWD):/src -w /src ghcr.io/siderolabs/extensions-duplicate-finder:$(GO_TOOLS_RELEASE) validate --image $(EXTENSIONS_IMAGE_REF) --exceptions hack/test/exceptions-amd64.yaml --platform=linux/amd64
@docker run --rm --net=host --user $(shell id -u):$(shell id -g) -v $(PWD):/src -w /src ghcr.io/siderolabs/extensions-duplicate-finder:$(GO_TOOLS_RELEASE) validate --image $(EXTENSIONS_IMAGE_REF) --exceptions hack/test/exceptions-arm64.yaml --platform=linux/arm64
ghaction:
enabled: true
condition: on-pull-request
environment:
PUSH: true
REGISTRY: registry.dev.siderolabs.io
---
kind: custom.Step
name: grype-scan
spec:
makefile:
enabled: true
phony: true
script:
- "@$(MAKE) local-$@ DEST=$(ARTIFACTS)/grype-scan PLATFORM=linux/amd64"
# - "@$(MAKE) target-$@ TARGET_ARGS=\"--build-arg=GRYPE_EXTRA_ARGS='--fail-on=negligible'\""
ghaction:
enabled: true
cronOnly: true
jobs:
- name: grype-scan
runnerGroup: pkgs
triggerLabels:
- integration/grype
crons:
- '30 7 * * *'
artifacts:
enabled: true
skipArtifactDownload: true
additional:
- name: results
paths:
- _out/grype-scan/**
retentionDays: "180"
always: true
---
kind: custom.Step
name: test-%
spec:
makefile:
enabled: true
script:
- |
@$(MAKE) docker-test-extension TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/$@:v0 --push=$(PUSH)" TEST_STAGE=$*
@docker pull $(REGISTRY)/$(USERNAME)/$@:v0
@orb debug $(REGISTRY)/$(USERNAME)/$@:v0
@docker image rm -f $(REGISTRY)/$(USERNAME)/$@:v0
---
kind: common.Renovate
spec:
packageRules:
- matchPackageNames:
- nvidia/open-gpu-kernel-modules
- open-iscsi/open-isns
- containers/crun
- git://git.kernel.org/pub/scm/libs/libcap/libcap.git
- git://sourceware.org/git/elfutils.git
- git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
- linux-nvme/libnvme
- linux-nvme/nvme-cli
- cloudflare/cloudflared
versioning: 'regex:^(?<major>\d+)\.(?<minor>\d+)\.?(?<patch>\d+)?$'
- matchPackageNames:
- https://sourceware.org/git/glibc.git
versioning: 'regex:^(?<major>\d+)\.(?<minor>\d+)\.?(?<patch>[0-9]{1,3})?$'
- matchPackageNames:
- google/gvisor
- intel/Intel-Linux-Processor-Microcode-Data-Files
versioning: 'regex:^(?<major>\d{4})(?<minor>\d{2})(?<patch>\d{2})\.?(?<build>\d+)?$'
- matchPackageNames:
- git://linux-nfs.org/~steved/libtirpc
versioning: 'regex:^(?<major>\d+)-(?<minor>\d+)-?(?<patch>\d+)?$'
- matchPackageNames:
- systemd/systemd
versioning: 'regex:^(?<major>\d+)\.?(?<minor>\d+)?\.?(?<patch>\d+)?$'
- matchPackageNames:
- https://gitlab.nic.cz/labs/bird.git
allowedVersions: "< 3.0.0"