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

Support customized cnm multi-arch-os image build #1359

Merged
merged 1 commit into from
Mar 29, 2022
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
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ push-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 @@ -270,6 +278,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