Skip to content

Commit

Permalink
Add gh installation specifically for ppc64le arch
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Feb 28, 2024
1 parent 06c57b8 commit ab5667c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docker/ci/config/gh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ done
ARCH=`uname -m`
VERSION="2.42.0"

# ppc64le specific
function gh_install_ppc64le {
set -e
GO_VERSION=`go version | cut -d ' ' -f3 | tr -d 'go'`
GO_REQUIRED_VERSION="1.21.0"
COMPARE_VERSION=`echo $GO_REQUIRED_VERSION $GO_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
if [ "$COMPARE_VERSION" != "$GCC_REQUIRED_VERSION" ]; then
VERSION=2.32.1
echo "go version on this env is older than $GO_REQUIRED_VERSION, use gh $VERSION"
fi

git clone --single-branch --branch v$VERSION https://github.com/cli/cli.git gh-cli
cd gh-cli
make install
cd ../
rm -rf gh-cli
gh --version
}

echo "$PLATFORM-$ARCH"

case $PLATFORM-$ARCH in
Expand All @@ -31,7 +50,7 @@ case $PLATFORM-$ARCH in
GH_TYPE="gh_${VERSION}_linux_arm64.tar.gz"
;;
linux-ppc64le)
echo "ppc64le not supported by gh cli, skipping now so docker image creation can proceed"
gh_install_ppc64le
exit 0
;;
*)
Expand Down

0 comments on commit ab5667c

Please sign in to comment.