Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make arch-specific releases use separate images instead of tags on the same image #3768

Merged
merged 1 commit into from
Dec 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions cluster-autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ifdef DOCKER_RM
else
RM_FLAG=
endif
IMAGE=$(REGISTRY)/cluster-autoscaler$(PROVIDER)

towca marked this conversation as resolved.
Show resolved Hide resolved
export DOCKER_CLI_EXPERIMENTAL := enabled

build: build-arch-$(GOARCH)

Expand All @@ -53,24 +56,24 @@ make-image: make-image-arch-$(GOARCH)
make-image-arch-%:
ifdef BASEIMAGE
docker build --pull --build-arg BASEIMAGE=${BASEIMAGE} \
-t ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}-$* \
-t ${IMAGE}-$*:${TAG} \
towca marked this conversation as resolved.
Show resolved Hide resolved
-f Dockerfile.$* .
else
docker build --pull \
-t ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}-$* \
-t ${IMAGE}-$*:${TAG} \
towca marked this conversation as resolved.
Show resolved Hide resolved
-f Dockerfile.$* .
endif
@echo "Image ${TAG}${FOR_PROVIDER}-$* completed"

push-image: push-image-arch-$(GOARCH)

push-image-arch-%:
./push_image.sh ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}-$*
./push_image.sh ${IMAGE}-$*:${TAG}

push-manifest:
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG} \
$(addprefix $(REGISTRY)/cluster-autoscaler$(PROVIDER):$(TAG)-, $(ALL_ARCH))
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push --purge ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}
docker manifest create ${IMAGE}:${TAG} \
$(addprefix $(REGISTRY)/cluster-autoscaler$(PROVIDER)-, $(addsuffix :$(TAG), $(ALL_ARCH)))
docker manifest push --purge ${IMAGE}:${TAG}

execute-release: $(addprefix make-image-arch-,$(ALL_ARCH)) $(addprefix push-image-arch-,$(ALL_ARCH)) push-manifest
@echo "Release ${TAG}${FOR_PROVIDER} completed"
Expand Down