From 37c1cd705340fa22023fea2a05af2eb19b745cd4 Mon Sep 17 00:00:00 2001 From: Jayesh Srivastava Date: Wed, 11 Oct 2023 13:01:08 +0530 Subject: [PATCH] Update Makefile --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c1f63ba..ae029e7 100644 --- a/Makefile +++ b/Makefile @@ -12,12 +12,12 @@ ifeq ($(FIPS_ENABLE),yes) RELEASE_LOC := release-fips endif -REGISTRY ?= gcr.io/spectro-dev-public/${RELEASE_LOC}/cluster-api-coxedge +REGISTRY ?= gcr.io/spectro-dev-public/$(USER)/${RELEASE_LOC}/cluster-api-coxedge SPECTRO_VERSION ?= 4.0.0-dev IMG_TAG ?= v0.5.5-spectro-${SPECTRO_VERSION} IMAGE_NAME ?= cluster-api-cox-controller:${IMG_TAG} IMG ?= $(REGISTRY)/$(IMAGE_NAME) -IMAGE ?= gcr.io/spectro-dev-public/${RELEASE_LOC}/cluster-api-coxedge/cluster-api-cox-controller +IMAGE ?= gcr.io/spectro-dev-public/$(USER)/${RELEASE_LOC}/cluster-api-coxedge/cluster-api-cox-controller # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" @@ -140,6 +140,8 @@ docker-build-all: $(addprefix docker-build-,$(ALL_ARCH)) docker-build: ## Build docker image with the manager. DOCKER_BUILDKIT=1 docker buildx build --load --platform linux/${ARCH} ${BUILD_ARGS} --build-arg ARCH=$(ARCH) -t $(IMAGE)-$(ARCH):$(IMG_TAG) . + MANIFEST_IMG=$(IMAGE)-$(ARCH) MANIFEST_TAG=$(IMG_TAG) $(MAKE) set-manifest-image + $(MAKE) set-manifest-pull-policy docker-push-%: ## Docker push $(MAKE) ARCH=$* docker-push @@ -157,6 +159,8 @@ docker-push-manifest: ## Push the fat manifest docker image. docker manifest create --amend ${IMG} $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(IMAGE)\-&:$(IMG_TAG)~g") @for arch in $(ALL_ARCH); do docker manifest annotate --arch $${arch} ${IMAGE}:${IMG_TAG} ${IMAGE}-$${arch}:${IMG_TAG}; done docker manifest push --purge ${IMAGE}:${IMG_TAG} + MANIFEST_IMG=$(IMAGE) MANIFEST_TAG=$(IMG_TAG) $(MAKE) set-manifest-image + $(MAKE) set-manifest-pull-policy .PHONY: docker-clean docker-clean: