Skip to content

Commit

Permalink
chore: add make targets to automate image signing
Browse files Browse the repository at this point in the history
This automates image signing process after a release.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Apr 19, 2023
1 parent ac58e68 commit c06874c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ extensions-metadata: $(ARTIFACTS)/bldr
@$(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;)

image-list: extensions-metadata ## Prints a list of all images built by this Makefile with digests.
@cat _out/extensions-metadata | xargs -I{} sh -c 'echo {}@$$(crane digest {})'

sign-images: ## Run cosign to sign all images built by this Makefile.
@$(MAKE) --quiet image-list | xargs -I{} sh -c 'cosign sign --yes {}'

.PHONY: deps.png
deps.png: $(ARTIFACTS)/bldr
$(ARTIFACTS)/bldr graph | dot -Tpng > deps.png
Expand Down

0 comments on commit c06874c

Please sign in to comment.