From b7fa846b038a7fa5334f12fb89f3939a4be1c898 Mon Sep 17 00:00:00 2001 From: adilhusain-s <95226191+adilhusain-s@users.noreply.github.com> Date: Fri, 2 Dec 2022 19:02:17 +0530 Subject: [PATCH] Adding multi-arch support for linux-ppc64le in CI for notebook-controller (kubeflow/kubeflow#6771) --- components/notebook-controller/DUMMY_FILE | 0 components/notebook-controller/Makefile | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 components/notebook-controller/DUMMY_FILE diff --git a/components/notebook-controller/DUMMY_FILE b/components/notebook-controller/DUMMY_FILE new file mode 100644 index 00000000..e69de29b diff --git a/components/notebook-controller/Makefile b/components/notebook-controller/Makefile index 05f9ec45..5bd5ee6d 100644 --- a/components/notebook-controller/Makefile +++ b/components/notebook-controller/Makefile @@ -1,6 +1,7 @@ # Image URL to use all building/pushing image targets IMG ?= notebook-controller TAG ?= $(shell git describe --tags --always --dirty) +ARCH ?= linux/amd64 # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd" @@ -85,6 +86,16 @@ docker-build: ## Build docker image with the manager. docker-push: ## Push docker image with the manager. docker push ${IMG}:${TAG} +.PHONY: docker-build-multi-arch +docker-build-multi-arch: ## Build multi-arch docker images with docker buildx + cd .. && docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} -f ./notebook-controller/Dockerfile . + + +.PHONY: docker-build-push-multi-arch +docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry + cd .. && docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} --push -f ./notebook-controller/Dockerfile . + + .PHONY: image image: docker-build docker-push ## Build and push docker image with the manager.