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

Revert "fix cross build conformance image error" #92042

Merged
merged 1 commit into from Jun 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 7 additions & 9 deletions cluster/images/conformance/Makefile
Expand Up @@ -34,9 +34,6 @@ CLUSTER_DIR?=$(shell pwd)/../../../cluster/
BASEIMAGE=debian:stretch-slim
TEMP_DIR:=$(shell mktemp -d -t conformanceXXXXXX)

#output format for docker buildx build [push, load]
OUTPUT=--load

all: build

build:
Expand All @@ -59,14 +56,15 @@ endif

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}
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
docker build --pull -t ${REGISTRY}/conformance-${ARCH}:${VERSION} ${TEMP_DIR}
rm -rf "${TEMP_DIR}"

push: OUTPUT=--push
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