Merge pull request #21557 from luxas/fix_typo

Do not push images that don't exist
This commit is contained in:
David McMahon 2016-02-19 11:56:21 -08:00
commit b24fc293e3

View File

@ -1514,8 +1514,6 @@ function kube::release::docker::release() {
local archs=( local archs=(
"amd64" "amd64"
"arm" "arm"
"arm64"
"ppc64le"
) )
local docker_push_cmd=("${DOCKER[@]}") local docker_push_cmd=("${DOCKER[@]}")
@ -1529,18 +1527,25 @@ function kube::release::docker::release() {
fi fi
for arch in "${archs[@]}"; do for arch in "${archs[@]}"; do
for binary in "${binaries[@]}"; do for binary in "${binaries[@]}"; do
local docker_target="${KUBE_DOCKER_REGISTRY}/${binary}-${arch}:${KUBE_DOCKER_IMAGE_TAG}"
kube::log::status "Pushing ${binary} to ${docker_target}"
"${docker_push_cmd[@]}" push "${docker_target}"
# If we have a amd64 docker image. Tag it without -amd64 also and push it for compatibility with earlier versions # Temporary fix. hyperkube-arm isn't built in the release process, so we can't push it
if [[ ${arch} == "amd64" ]]; then # This if statement skips the push for hyperkube-arm
local legacy_docker_target="${KUBE_DOCKER_REGISTRY}/${binary}:${KUBE_DOCKER_IMAGE_TAG}" if [[ ${arch} != "arm" || ${binary} != "hyperkube" ]]; then
"${DOCKER[@]}" tag -f "${docker_target}" "${legacy_docker_target}" 2>/dev/null
kube::log::status "Pushing ${binary} to ${legacy_docker_target}" local docker_target="${KUBE_DOCKER_REGISTRY}/${binary}-${arch}:${KUBE_DOCKER_IMAGE_TAG}"
"${docker_push_cmd[@]}" push "${legacy_docker_target}" kube::log::status "Pushing ${binary} to ${docker_target}"
"${docker_push_cmd[@]}" push "${docker_target}"
# If we have a amd64 docker image. Tag it without -amd64 also and push it for compatibility with earlier versions
if [[ ${arch} == "amd64" ]]; then
local legacy_docker_target="${KUBE_DOCKER_REGISTRY}/${binary}:${KUBE_DOCKER_IMAGE_TAG}"
"${DOCKER[@]}" tag -f "${docker_target}" "${legacy_docker_target}" 2>/dev/null
kube::log::status "Pushing ${binary} to ${legacy_docker_target}"
"${docker_push_cmd[@]}" push "${legacy_docker_target}"
fi
fi fi
done done
done done