Skip to content

Commit ee5fee7

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 <git@frezbo.dev>
1 parent be028b6 commit ee5fee7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ GENERATE_VEX_PREFIX ?= ghcr.io/siderolabs/generate-vex
3232
GENERATE_VEX ?= latest
3333

3434
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
35-
IMAGE_SIGNER_IMAGE ?= ghcr.io/siderolabs/image-signer:latest
3635
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
36+
IMAGE_SIGNER_RELEASE ?= v0.1.1
3737

3838
PKG_APPARMOR ?= $(PKGS_PREFIX)/apparmor:$(PKGS)
3939
PKG_CA_CERTIFICATES ?= $(PKGS_PREFIX)/ca-certificates:$(PKGS)
@@ -666,9 +666,14 @@ clean: ## Cleans up all artifacts.
666666
image-list: ## Prints a list of all images built by this Makefile with digests.
667667
@echo -n installer installer-base talos imager talosctl talosctl-all | xargs -d ' ' -I{} sh -c 'echo $(REGISTRY_AND_USERNAME)/{}:$(IMAGE_TAG_IN)' | xargs -I{} sh -c 'echo {}@$$(crane digest {})'
668668

669+
$(ARTIFACTS)/image-signer: $(ARTIFACTS) ## Downloads image-signer binary
670+
@curl -sSL https://github.com/siderolabs/go-tools/releases/download/$(IMAGE_SIGNER_RELEASE)/image-signer-$(OPERATING_SYSTEM)-$(ARCH) -o $(ARTIFACTS)/image-signer
671+
@chmod +x $(ARTIFACTS)/image-signer
672+
673+
669674
.PHONY: sign-images
670-
sign-images: ## Run cosign to sign all images built by this Makefile.
671-
@docker run --pull=always --rm --net=host $(IMAGE_SIGNER_IMAGE) sign $(shell $(MAKE) --quiet image-list REGISTRY_AND_USERNAME=$(REGISTRY_AND_USERNAME) IMAGE_TAG_IN=$(IMAGE_TAG_IN))
675+
sign-images: $(ARTIFACTS)/image-signer ## Run cosign to sign all images built by this Makefile.
676+
@$(ARTIFACTS)/image-signer sign $(shell $(MAKE) --quiet image-list REGISTRY_AND_USERNAME=$(REGISTRY_AND_USERNAME) IMAGE_TAG_IN=$(IMAGE_TAG_IN))
672677

673678
.PHONY: reproducibility-test
674679
reproducibility-test: $(ARTIFACTS)

0 commit comments

Comments
 (0)