mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[Ubuntu] Added HTTP status code check to download_with_retries (#3721)
* Disable exit on error temporary to implement retry logic based on exit code * Check HTTP response code and retry if it's not 200 * Make variables local to not interfere with other scripts Co-authored-by: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,7 @@ source $HELPER_SCRIPTS/etc-environment.sh
|
||||
GRAALVM_ROOT=/usr/local/graalvm
|
||||
export GRAALVM_11_ROOT=$GRAALVM_ROOT/graalvm-ce-java11*
|
||||
|
||||
url=$(curl -s https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest | jq -r '.assets[].browser_download_url | select(contains("graalvm-ce-java11-linux-amd64"))')
|
||||
url=$(curl -s https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest | jq -r '.assets[].browser_download_url | select(contains("graalvm-ce-java11-linux-amd64") and endswith("tar.gz"))')
|
||||
download_with_retries "$url" "/tmp" "graalvm-archive.tar.gz"
|
||||
mkdir $GRAALVM_ROOT
|
||||
tar -xzf "/tmp/graalvm-archive.tar.gz" -C $GRAALVM_ROOT
|
||||
@@ -18,4 +18,4 @@ setEtcEnvironmentVariable "GRAALVM_11_ROOT" $GRAALVM_11_ROOT
|
||||
# Install Native Image
|
||||
$GRAALVM_11_ROOT/bin/gu install native-image
|
||||
|
||||
invoke_tests "Tools" "GraalVM"
|
||||
invoke_tests "Tools" "GraalVM"
|
||||
|
||||
Reference in New Issue
Block a user