Skip to content

Commit 25c20c9

Browse files
committed
fix: image-signer commands
Use the `image-signer` cli since we cannot pass in docker login credentials saved in keychain to `docker` container. Signed-off-by: Noel Georgi <[email protected]>
1 parent 6dffff6 commit 25c20c9

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

.kres.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ spec:
116116
toplevel: true
117117
- name: internal/extensions/descriptions.yaml
118118
toplevel: true
119+
- name: $(ARTIFACTS)/image-signer
120+
toplevel: true
119121
- name: sign-images
120122
toplevel: true
121123
- name: grype-scan
@@ -211,17 +213,30 @@ spec:
211213
done
212214
---
213215
kind: custom.Step
214-
name: sign-images
216+
name: $(ARTIFACTS)/image-signer
215217
spec:
216218
makefile:
217219
enabled: true
218220
phony: true
219221
variables:
220-
- name: IMAGE_SIGNER_IMAGE
221-
defaultValue: ghcr.io/siderolabs/image-signer:latest
222+
- name: IMAGE_SIGNER_RELEASE
223+
defaultValue: v0.1.1
224+
script:
225+
- |
226+
@curl -sSL https://github.com/siderolabs/go-tools/releases/download/$(IMAGE_SIGNER_RELEASE)/image-signer-$(OPERATING_SYSTEM)-$(GOARCH) -o $(ARTIFACTS)/image-signer
227+
@chmod +x $(ARTIFACTS)/image-signer
228+
---
229+
kind: custom.Step
230+
name: sign-images
231+
spec:
232+
makefile:
233+
enabled: true
234+
phony: true
235+
depends:
236+
- $(ARTIFACTS)/image-signer
222237
script:
223238
- |
224-
@docker run --pull=always --rm --net=host $(IMAGE_SIGNER_IMAGE) sign --timeout=15m $(shell crane export $(EXTENSIONS_IMAGE_REF) | tar x --to-stdout image-digests) $(EXTENSIONS_IMAGE_REF)@$$(crane digest $(EXTENSIONS_IMAGE_REF))
239+
@$(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))
225240
---
226241
kind: custom.Step
227242
name: grype-scan

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-10-27T13:21:29Z by kres 46e133d.
3+
# Generated on 2025-10-30T03:39:23Z by kres cd5a938.
44

55
# common variables
66

@@ -55,7 +55,7 @@ PKGS ?= v1.12.0-alpha.0-45-gda97c36
5555
PKGS_PREFIX ?= ghcr.io/siderolabs
5656
TOOLS ?= v1.12.0-alpha.0-16-ga08cc1f
5757
TOOLS_PREFIX ?= ghcr.io/siderolabs
58-
IMAGE_SIGNER_IMAGE ?= ghcr.io/siderolabs/image-signer:latest
58+
IMAGE_SIGNER_RELEASE ?= v0.1.1
5959

6060
# targets defines all the available targets
6161

@@ -260,9 +260,14 @@ internal/extensions/descriptions.yaml: internal/extensions/image-digests
260260
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; \
261261
done
262262

263+
.PHONY: $(ARTIFACTS)/image-signer
264+
$(ARTIFACTS)/image-signer:
265+
@curl -sSL https://github.com/siderolabs/go-tools/releases/download/$(IMAGE_SIGNER_RELEASE)/image-signer-$(OPERATING_SYSTEM)-$(GOARCH) -o $(ARTIFACTS)/image-signer
266+
@chmod +x $(ARTIFACTS)/image-signer
267+
263268
.PHONY: sign-images
264-
sign-images:
265-
@docker run --pull=always --rm --net=host $(IMAGE_SIGNER_IMAGE) sign --timeout=15m $(shell crane export $(EXTENSIONS_IMAGE_REF) | tar x --to-stdout image-digests) $(EXTENSIONS_IMAGE_REF)@$$(crane digest $(EXTENSIONS_IMAGE_REF))
269+
sign-images: $(ARTIFACTS)/image-signer
270+
@$(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))
266271

267272
.PHONY: grype-scan
268273
grype-scan:

0 commit comments

Comments
 (0)