Skip to content

Commit

Permalink
Add release-build and release-publish targets
Browse files Browse the repository at this point in the history
  • Loading branch information
danudey committed Nov 12, 2024
1 parent 7c376cc commit d7ef69e
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions key-cert-provisioner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ $(BINDIR)/test-signer-$(ARCH):
# BUILD IMAGE
###############################################################################
.PHONY: image-all
image-all: $(addprefix sub-image-,$(VALIDARCHES)) sub-image-fips-amd64
image-all: $(addprefix sub-image-,$(VALIDARCHES))
sub-image-%:
$(MAKE) image ARCH=$*
sub-image-fips-%:
$(MAKE) image FIPS=true ARCH=$*

SIGNER_CREATED=.signer.created-$(ARCH)

Expand Down Expand Up @@ -93,3 +91,26 @@ clean:
-docker image rm -f $$(docker images $(KEY_CERT_PROVISIONER_IMAGE) -a -q)
-docker image rm -f $$(docker images $(TEST_SIGNER_IMAGE) -a -q)

###############################################################################
# Release
###############################################################################
## Produces a clean build of release artifacts at the specified version.
release-build: .release-$(VERSION).created
.release-$(VERSION).created:
$(MAKE) clean image-all RELEASE=true
$(MAKE) retag-build-images-with-registries IMAGETAG=$(VERSION) RELEASE=true
# Generate the `latest` images.
$(MAKE) retag-build-images-with-registries IMAGETAG=latest RELEASE=true
touch $@

## Pushes a github release and release artifacts produced by `make release-build`.
release-publish: release-prereqs .release-$(VERSION).published
.release-$(VERSION).published:
$(MAKE) push-images-to-registries push-manifests IMAGETAG=$(VERSION) RELEASE=$(RELEASE) CONFIRM=$(CONFIRM)
touch $@

## Pushes a github release and release artifacts produced by `make release-build`.
release-publish: release-prereqs .release-ksp-$(VERSION).published
.release-ksp-$(VERSION).published:
$(MAKE) push-images-to-registries push-manifests IMAGETAG=$(VERSION) RELEASE=$(RELEASE) CONFIRM=$(CONFIRM)
touch $@

0 comments on commit d7ef69e

Please sign in to comment.