Skip to content

Commit 1946332

Browse files
frezbosmira
authored andcommitted
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> (cherry picked from commit ee5fee7)
1 parent 62aa096 commit 1946332

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)
@@ -718,9 +718,14 @@ clean: ## Cleans up all artifacts.
718718
image-list: ## Prints a list of all images built by this Makefile with digests.
719719
@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 {})'
720720

721+
$(ARTIFACTS)/image-signer: $(ARTIFACTS) ## Downloads image-signer binary
722+
@curl -sSL https://github.com/siderolabs/go-tools/releases/download/$(IMAGE_SIGNER_RELEASE)/image-signer-$(OPERATING_SYSTEM)-$(ARCH) -o $(ARTIFACTS)/image-signer
723+
@chmod +x $(ARTIFACTS)/image-signer
724+
725+
721726
.PHONY: sign-images
722-
sign-images: ## Run cosign to sign all images built by this Makefile.
723-
@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))
727+
sign-images: $(ARTIFACTS)/image-signer ## Run cosign to sign all images built by this Makefile.
728+
@$(ARTIFACTS)/image-signer sign $(shell $(MAKE) --quiet image-list REGISTRY_AND_USERNAME=$(REGISTRY_AND_USERNAME) IMAGE_TAG_IN=$(IMAGE_TAG_IN))
724729

725730
.PHONY: reproducibility-test
726731
reproducibility-test: $(ARTIFACTS)

0 commit comments

Comments
 (0)