diff --git a/test/images/Makefile b/test/images/Makefile index 7376c2a9fc3..b588d739aca 100644 --- a/test/images/Makefile +++ b/test/images/Makefile @@ -37,4 +37,7 @@ all-container: all-push: all-container ./image-util.sh push $(WHAT) -.PHONY: all all-push all-container +all-build-and-push: + ./image-util.sh build_and_push ${WHAT} + +.PHONY: all all-build-and-push all-push all-container diff --git a/test/images/cloudbuild.yaml b/test/images/cloudbuild.yaml index c1217938d55..2912b934601 100644 --- a/test/images/cloudbuild.yaml +++ b/test/images/cloudbuild.yaml @@ -19,7 +19,7 @@ steps: - REGISTRY=gcr.io/k8s-staging-e2e-test-images # TODO(claudiub): Readd the REMOTE_DOCKER_URL_${os_version} to reenable the Windows test image building process. args: - - all-push + - all-build-and-push substitutions: # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and # can be used as a substitution diff --git a/test/images/image-util.sh b/test/images/image-util.sh index 3c62ecd736e..b750449f963 100755 --- a/test/images/image-util.sh +++ b/test/images/image-util.sh @@ -237,6 +237,14 @@ push() { docker manifest push --purge "${REGISTRY}/${image}:${TAG}" } +# This function is for building AND pushing images. Useful if ${WHAT} is "all-conformance". +# This will allow images to be pushed immediately after they've been pushed. +build_and_push() { + image=$1 + build "${image}" + push "${image}" +} + # This function is for building the go code bin() { local arch_prefix=""