Skip to content

Commit

Permalink
Merge pull request kubernetes#120100 from ruquanzhao/fixFindReleaseTars
Browse files Browse the repository at this point in the history
Support multiarch/platfrom in find-release-tars
  • Loading branch information
k8s-ci-robot authored Aug 23, 2023
2 parents 07f47d8 + 037640a commit fb785f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,20 @@ function find-tar() {
# SERVER_BINARY_TAR
# KUBE_MANIFESTS_TAR
function find-release-tars() {
SERVER_BINARY_TAR=$(find-tar kubernetes-server-linux-amd64.tar.gz)
# Use first item in KUBE_BUILD_PLATFORMS as server platform
KUBE_BUILD_PLATFORMS=${KUBE_BUILD_PLATFORMS:-"linux/amd64"}
SERVER_PLATFORM=$(cut -d' ' -f1 <<< "${KUBE_BUILD_PLATFORMS}")
OS=$(cut -d'/' -f1 <<< "${SERVER_PLATFORM}")
ARCH=$(cut -d'/' -f2 <<< "${SERVER_PLATFORM}")
SERVER_BINARY_TAR=$(find-tar kubernetes-server-"${OS}"-"${ARCH}".tar.gz)
if [[ -z "${SERVER_BINARY_TAR}" ]]; then
exit 1
fi
export SERVER_BINARY_TAR

local find_result
if [[ "${NUM_WINDOWS_NODES}" -gt "0" ]]; then
if NODE_BINARY_TAR=$(find-tar kubernetes-node-windows-amd64.tar.gz); then
if NODE_BINARY_TAR=$(find-tar kubernetes-node-windows-"${ARCH}".tar.gz); then
find_result=0
else
find_result=1
Expand Down

0 comments on commit fb785f1

Please sign in to comment.