Skip to content

Commit

Permalink
Better source_install_lib: add retries and print checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiitk committed Apr 27, 2024
1 parent 9193654 commit 96c1443
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/grpc-js-xds/scripts/psm-interop-test-node.sh
Expand Up @@ -20,6 +20,19 @@ readonly GITHUB_REPOSITORY_NAME="grpc-node"
readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh"
readonly BUILD_SCRIPT_DIR="$(dirname "$0")"

echo "Sourcing test driver install script from: ${TEST_DRIVER_INSTALL_SCRIPT_URL}"
source /dev/stdin <<< "$(curl -s "${TEST_DRIVER_INSTALL_SCRIPT_URL}")"
psm::lang::source_install_lib() {
echo "Sourcing test driver install script from: ${TEST_DRIVER_INSTALL_SCRIPT_URL}"
local install_lib
# Download to a tmp file.
install_lib="$(mktemp -d)/psm_interop_kokoro_lib.sh"
curl -s --retry=5 --retry-connrefused -o "${install_lib}" "${TEST_DRIVER_INSTALL_SCRIPT_URL}"
# Checksum.
if command -v sha256sum &> /dev/null; then
echo "Install script checksum:"
sha256sum "${install_lib}"
fi
source "${install_lib}"
}

psm::lang::source_install_lib
psm::run "${PSM_TEST_SUITE}"

0 comments on commit 96c1443

Please sign in to comment.