Merge pull request #87647 from claudiubelu/image-promoter/cleanup-manifest-list

Image Promoter: Cleans manifest list
This commit is contained in:
Kubernetes Prow Robot 2020-01-29 22:11:36 -08:00 committed by GitHub
commit 4ee00204ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,8 @@ push() {
# The manifest command is still experimental as of Docker 18.09.2
export DOCKER_CLI_EXPERIMENTAL="enabled"
# reset manifest list; needed in case multiple images are being built / pushed.
manifest=()
# Make archs list into image manifest. Eg: 'amd64 ppc64le' to '${REGISTRY}/${image}-amd64:${TAG} ${REGISTRY}/${image}-ppc64le:${TAG}'
while IFS='' read -r line; do manifest+=("$line"); done < <(echo "$archs" | ${SED} -e "s~[^ ]*~$REGISTRY\/$image\-&:$TAG~g")
docker manifest create --amend "${REGISTRY}/${image}:${TAG}" "${manifest[@]}"