diff --git a/test/images/Makefile b/test/images/Makefile index 6b7e7439b3..eab02cc3a9 100644 --- a/test/images/Makefile +++ b/test/images/Makefile @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +include ../../hack/make-rules/Makefile.manifest + REGISTRY ?= gcr.io/kubernetes-e2e-test-images GOARM=7 QEMUVERSION=v2.9.1 @@ -34,7 +36,7 @@ all: all-container all-container: ./image-util.sh build $(WHAT) -all-push: all-container +all-push: all-container manifest-tool ./image-util.sh push $(WHAT) .PHONY: all all-push all-container diff --git a/test/images/image-util.sh b/test/images/image-util.sh index 0c092a4a99..c933d2c8f9 100755 --- a/test/images/image-util.sh +++ b/test/images/image-util.sh @@ -99,6 +99,10 @@ push() { TAG=$(<${IMAGE}/VERSION) docker push ${REGISTRY}/${IMAGE}-${arch}:${TAG} done + + # Make archs list into OS/architecture pair. Eg: 'amd64 ppc64le' to 'linux/amd64,linux/ppc64le' + archs=$(echo $archs | sed -e 's/[^ ]* */linux\/&/g' -e 's/ /,/g') + manifest-tool push from-args --platforms ${archs} --template ${REGISTRY}/${IMAGE}-ARCH:${TAG} --target ${REGISTRY}/${IMAGE}:${TAG} } # This function is for building the go code