Files
runner-images/images/linux/scripts/installers/graalvm.sh
Darleev 6637167579 [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>
2021-07-19 11:29:53 +03:00

22 lines
746 B
Bash

#!/bin/bash -e
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/etc-environment.sh
# Install GraalVM
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") 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
# Set environment variable for GraalVM root
setEtcEnvironmentVariable "GRAALVM_11_ROOT" $GRAALVM_11_ROOT
# Install Native Image
$GRAALVM_11_ROOT/bin/gu install native-image
invoke_tests "Tools" "GraalVM"