-
Notifications
You must be signed in to change notification settings - Fork 1
/
.kres.yaml
168 lines (168 loc) · 4.46 KB
/
.kres.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
---
kind: pkgfile.Build
spec:
targets:
- amdgpu-firmware
- amd-ucode
- binfmt-misc
- bnx2-bnx2x
- btrfs
- chelsio-drivers
- chelsio-firmware
- crun
- drbd
- ecr-credential-provider
- fuse3
- gasket-driver
- gvisor
- gvisor-debug
- hello-world-service
- i915-ucode
- intel-ice-firmware
- intel-ucode
- iscsi-tools
- kata-containers
- mdadm
- mei
- nut-client
- nvidia-container-toolkit-lts
- nvidia-container-toolkit-production
- nvidia-fabricmanager-lts
- nvidia-fabricmanager-production
- nvidia-open-gpu-kernel-modules-lts
- nvidia-open-gpu-kernel-modules-production
- qemu-guest-agent
- qlogic-firmware
- realtek-firmware
- spin
- stargz-snapshotter
- tailscale
- thunderbolt
- uinput
- usb-modem-drivers
- util-linux-tools
- v4l-uvc-drivers
- vmtoolsd-guest-agent
- wasmedge
- xen-guest-agent
- zfs
additionalTargets:
nonfree:
- nonfree-kmod-nvidia-lts
- nonfree-kmod-nvidia-production
reproducibleTargetName: reproducibility
extraBuildArgs:
- TAG
- PKGS
- PKGS_PREFIX
makefile:
extraVariables:
- name: EXTENSIONS_IMAGE_REF
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
- name: PKGS
defaultValue: v1.8.0-16-g71d23b4
- name: PKGS_PREFIX
defaultValue: ghcr.io/siderolabs
useBldrPkgTagResolver: true
---
kind: common.Build
spec:
ignoredPaths:
- "internal/extensions/image-digests"
- "internal/extensions/descriptions.yaml"
---
kind: auto.CustomSteps
spec:
steps:
- name: check-dirty
toplevel: true
- name: extensions
toplevel: true
- name: extensions-metadata
toplevel: true
- name: internal/extensions/image-digests
toplevel: true
- name: internal/extensions/descriptions.yaml
toplevel: true
- name: sign-images
toplevel: true
- name: extensions-info
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-metadata
spec:
makefile:
enabled: true
phony: true
depends:
- $(ARTIFACTS)/bldr
script:
- |
@rm -f _out/extensions-metadata
@$(foreach target,$(TARGETS),echo $(REGISTRY)/$(USERNAME)/$(target):$(shell $(ARTIFACTS)/bldr eval --target $(target) --build-arg TAG=$(TAG) '{{.VERSION}}' 2>/dev/null) >> _out/extensions-metadata;)
@$(foreach target,$(NONFREE_TARGETS),echo $(REGISTRY)/$(USERNAME)/$(target):$(shell $(ARTIFACTS)/bldr eval --target $(target) --build-arg TAG=$(TAG) '{{.VERSION}}' 2>/dev/null) >> _out/extensions-metadata;)
---
kind: custom.Step
name: internal/extensions/image-digests
spec:
makefile:
enabled: true
phony: true
depends:
- extensions-metadata
script:
- |
@echo "Generating image digests..."
@cat _out/extensions-metadata | xargs -I{} sh -c 'echo {}@$$(crane digest {})' > 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: sign-images
spec:
makefile:
enabled: true
phony: true
script:
- |
@for image in $(shell crane export $(EXTENSIONS_IMAGE_REF) | tar x --to-stdout image-digests) $(EXTENSIONS_IMAGE_REF)@$$(crane digest $(EXTENSIONS_IMAGE_REF)); do \
echo '==>' $$image; \
cosign verify $$image --certificate-identity-regexp '@siderolabs\.com$$' --certificate-oidc-issuer https://accounts.google.com || \
cosign sign --yes $$image; \
done
---
kind: common.Repository
spec:
conformMaximumOfOneCommit: false