Skip to content

Commit

Permalink
Merge pull request #97459 from yu2003w/issue#97458
Browse files Browse the repository at this point in the history
Build multiplatform images when issue `make release-images`
  • Loading branch information
k8s-ci-robot committed Jan 15, 2021
2 parents b6958b2 + a6ab466 commit 5932f34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/lib/release.sh
Expand Up @@ -383,7 +383,11 @@ EOF
echo "COPY nsswitch.conf /etc/" >> "${docker_file_path}"
fi

"${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
if [[ "${arch}" == "linux/s390x" || "${arch}" == "linux/ppc64le" ]]; then
DOCKER_CLI_EXPERIMENTAL=enabled "${DOCKER[@]}" buildx build --platform linux/"${arch}" --load ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
else
"${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
fi
# If we are building an official/alpha/beta release we want to keep
# docker images and tag them appropriately.
local -r release_docker_image_tag="${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}"
Expand Down

0 comments on commit 5932f34

Please sign in to comment.