Skip to content

Commit

Permalink
Support multiarch/platfrom in find-release-tars
Browse files Browse the repository at this point in the history
Signed-off-by: Ruquan Zhao [email protected]
  • Loading branch information
RuquanZhao committed Aug 22, 2023
1 parent 2979242 commit 98d772c
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 98d772c

Please sign in to comment.