From 3a86fa68bfa0e713f534602d243ea44dab8e9918 Mon Sep 17 00:00:00 2001 From: KevFan Date: Wed, 11 Oct 2023 15:07:44 +0100 Subject: [PATCH] workflow: fix flaky install of operator sdk on mac os --- utils/install-operator-sdk.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/install-operator-sdk.sh b/utils/install-operator-sdk.sh index 4cbe3d6cf..1eae11d4f 100755 --- a/utils/install-operator-sdk.sh +++ b/utils/install-operator-sdk.sh @@ -14,6 +14,14 @@ if [ ! -f "$1" ]; then TMP_DIR=$(mktemp -d) cd $TMP_DIR + if [[ $OS == 'darwin' ]]; then + ls -larth + mkdir -p ".gnupg" + echo "Disabling ipv6 for pgp on mac" + echo "disable-ipv6" > .gnupg/dirmngr.conf + gpgconf --kill all + fi + echo "Downloading $OPERATOR_SDK_DL_BINARY" curl -sLO $OPERATOR_SDK_DL_BINARY gpg --keyserver keyserver.ubuntu.com --recv-keys 052996E2A20B5C7E @@ -22,6 +30,7 @@ if [ ! -f "$1" ]; then gpg -u "Operator SDK (release) " --verify checksums.txt.asc if [[ $OS == 'darwin' ]]; then grep operator-sdk_${OS}_${ARCH} checksums.txt | shasum -a 256 -c - + cat .gnupg/dirmngr.conf else grep operator-sdk_${OS}_${ARCH} checksums.txt | sha256sum -c - fi