mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #92042 from kubernetes/revert-90400-1737
Revert "fix cross build conformance image error"
This commit is contained in:
commit
e7ca64fbe1
@ -34,9 +34,6 @@ CLUSTER_DIR?=$(shell pwd)/../../../cluster/
|
|||||||
BASEIMAGE=debian:stretch-slim
|
BASEIMAGE=debian:stretch-slim
|
||||||
TEMP_DIR:=$(shell mktemp -d -t conformanceXXXXXX)
|
TEMP_DIR:=$(shell mktemp -d -t conformanceXXXXXX)
|
||||||
|
|
||||||
#output format for docker buildx build [push, load]
|
|
||||||
OUTPUT=--load
|
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@ -59,14 +56,15 @@ endif
|
|||||||
|
|
||||||
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
|
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
|
||||||
|
|
||||||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --pull --platform linux/$(ARCH) $(OUTPUT) -t ${REGISTRY}/conformance-${ARCH}:${VERSION} ${TEMP_DIR}
|
docker build --pull -t ${REGISTRY}/conformance-${ARCH}:${VERSION} ${TEMP_DIR}
|
||||||
ifeq ($(ARCH),amd64)
|
|
||||||
docker rmi ${REGISTRY}/conformance:${VERSION} 2>/dev/null || true
|
|
||||||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --pull --platform linux/$(ARCH) $(OUTPUT) -t ${REGISTRY}/conformance:${VERSION} ${TEMP_DIR}
|
|
||||||
endif
|
|
||||||
rm -rf "${TEMP_DIR}"
|
rm -rf "${TEMP_DIR}"
|
||||||
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
push: build
|
||||||
|
docker push ${REGISTRY}/conformance-${ARCH}:${VERSION}
|
||||||
|
ifeq ($(ARCH),amd64)
|
||||||
|
docker rmi ${REGISTRY}/conformance:${VERSION} 2>/dev/null || true
|
||||||
|
docker tag ${REGISTRY}/conformance-${ARCH}:${VERSION} ${REGISTRY}/conformance:${VERSION}
|
||||||
|
docker push ${REGISTRY}/conformance:${VERSION}
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: build push all
|
.PHONY: build push all
|
||||||
|
Loading…
Reference in New Issue
Block a user