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 28e0b83 commit 03cc689
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions buildscripts/kokoro/psm-interop-test-java.sh
Expand Up @@ -7,6 +7,19 @@ readonly GITHUB_REPOSITORY_NAME="grpc-java"
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-connrefused --retry 5 -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 03cc689

Please sign in to comment.