Skip to content

Commit

Permalink
Merge pull request #1480 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1359-to-release-1.23

[release-1.23] Support customized cnm multi-arch-os image build
  • Loading branch information
MartinForReal committed Apr 13, 2022
2 parents f45b198 + 82e3cca commit bfece08
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ push-ccm-image: build-ccm-image ## Push controller-manager image.
push-node-image-linux: ## Push node-manager image for Linux.
docker push $(NODE_MANAGER_LINUX_FULL_IMAGE_PREFIX)-$(ARCH)

push-node-image-linux-push-name-%:
$(MAKE) ARCH=$* push-node-image-linux-push-name

.PHONY: push-node-image-linux-push-name
push-node-image-linux-push-name:
docker tag $(NODE_MANAGER_LINUX_FULL_IMAGE_PREFIX)-$(ARCH) $(NODE_MANAGER_IMAGE)
docker push $(NODE_MANAGER_IMAGE)

.PHONY: release-ccm-e2e-test-image
release-ccm-e2e-test-image: ## Build and release e2e test image.
docker build -t $(CCM_E2E_TEST_RELEASE_IMAGE) -f ./e2e.Dockerfile .
Expand Down Expand Up @@ -273,6 +281,16 @@ push-all-ccm-images: $(addprefix push-ccm-image-,$(ALL_ARCH.linux))
push-ccm-image-%:
$(MAKE) ARCH=$* push-ccm-image

manifest-node-manager-image-windows-%:
$(MAKE) WINDOWS_OSVERSION=$(call word-hyphen,$*,1) ARCH=$(call word-hyphen,$*,2) manifest-node-manager-image-windows

.PHONY: manifest-node-manager-image-windows
manifest-node-manager-image-windows:
set -x
docker manifest create $(NODE_MANAGER_IMAGE) --amend $(NODE_MANAGER_LINUX_FULL_IMAGE_PREFIX)-$(ARCH) --amend $(NODE_MANAGER_WINDOWS_FULL_IMAGE_PREFIX)-$(WINDOWS_OSVERSION)-$(ARCH)
docker manifest annotate --os linux --arch $(ARCH) $(NODE_MANAGER_IMAGE) $(NODE_MANAGER_LINUX_FULL_IMAGE_PREFIX)-$(ARCH)
docker manifest annotate --os windows --arch $(ARCH) --os-version $(WINDOWS_OSVERSION) $(NODE_MANAGER_IMAGE) $(NODE_MANAGER_WINDOWS_FULL_IMAGE_PREFIX)-$(WINDOWS_OSVERSION)-$(ARCH)
docker manifest push --purge $(NODE_MANAGER_IMAGE)

## --------------------------------------
##@ Tests
Expand Down

0 comments on commit bfece08

Please sign in to comment.