diff --git a/images/linux/scripts/installers/aliyun-cli.sh b/images/linux/scripts/installers/aliyun-cli.sh index 477fcffcb..fd9737caa 100644 --- a/images/linux/scripts/installers/aliyun-cli.sh +++ b/images/linux/scripts/installers/aliyun-cli.sh @@ -4,9 +4,12 @@ ## Desc: Installs Alibaba Cloud CLI ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/install.sh + # Install Alibaba Cloud CLI URL=$(curl -s https://api.github.com/repos/aliyun/aliyun-cli/releases/latest | jq -r '.assets[].browser_download_url | select(contains("aliyun-cli-linux"))') -wget -P /tmp $URL +download_with_retries $URL "/tmp" tar xzf /tmp/aliyun-cli-linux-*-amd64.tgz mv aliyun /usr/local/bin diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index b163d7a57..af2a218ce 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -51,7 +51,7 @@ mkdir -p ${ANDROID_SDK_ROOT} # Download the latest command line tools so that we can accept all of the licenses. # See https://developer.android.com/studio/#command-tools -wget -O android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip +download_with_retries https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip "." android-sdk.zip unzip -qq android-sdk.zip -d ${ANDROID_SDK_ROOT} rm -f android-sdk.zip diff --git a/images/linux/scripts/installers/aws-sam-cli.sh b/images/linux/scripts/installers/aws-sam-cli.sh index cface58d4..4fbaa36ec 100644 --- a/images/linux/scripts/installers/aws-sam-cli.sh +++ b/images/linux/scripts/installers/aws-sam-cli.sh @@ -5,10 +5,13 @@ ## Requires Python >=3.6, must be run as non-root user after toolset installation ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/install.sh + # Download latest aws sam cli sources TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url') TarballPath="/tmp/aws-sam-cli.tar.gz" -wget $TarballUrl -O $TarballPath +download_with_retries $TarballUrl "/tmp" "aws-sam-cli.tar.gz" tar -xzf $TarballPath -C /tmp cd /tmp/aws-aws-sam-cli* diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index 5f9138eba..4e8ff01f1 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -30,7 +30,7 @@ function SetDefaultClang { } # Download script for automatic installation -wget https://apt.llvm.org/llvm.sh +download_with_retries https://apt.llvm.org/llvm.sh chmod +x llvm.sh versions=$(get_toolset_value '.clang.versions[]') diff --git a/images/linux/scripts/installers/containers.sh b/images/linux/scripts/installers/containers.sh index 3ae559f68..65adc22ce 100644 --- a/images/linux/scripts/installers/containers.sh +++ b/images/linux/scripts/installers/containers.sh @@ -8,7 +8,7 @@ install_packages=(podman buildah skopeo) source /etc/os-release sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" -wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key +wget -qnv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key apt-key add Release.key apt-get update -qq apt-get -qq -y install ${install_packages[@]} diff --git a/images/linux/scripts/installers/erlang.sh b/images/linux/scripts/installers/erlang.sh index 458f7fa00..b65b545ae 100644 --- a/images/linux/scripts/installers/erlang.sh +++ b/images/linux/scripts/installers/erlang.sh @@ -8,7 +8,7 @@ source_list=/etc/apt/sources.list.d/eslerlang.list # Install Erlang echo "deb https://binaries.erlang-solutions.com/debian $(lsb_release -cs) contrib" > $source_list -wget -O - https://binaries.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - +wget -q -O - https://binaries.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - apt-get update apt-get install -y --no-install-recommends esl-erlang diff --git a/images/linux/scripts/installers/firefox.sh b/images/linux/scripts/installers/firefox.sh index 6c4c6c283..d7fe92dce 100644 --- a/images/linux/scripts/installers/firefox.sh +++ b/images/linux/scripts/installers/firefox.sh @@ -4,6 +4,9 @@ ## Desc: Installs Firefox ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/install.sh + # Install Firefox apt-get install -y firefox @@ -14,15 +17,13 @@ echo 'pref("intl.locale.requested","en_US");' >> "/usr/lib/firefox/browser/defau # Download and unpack latest release of geckodriver URL=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r '.assets[].browser_download_url | select(test("linux64.tar.gz$"))') echo "Downloading geckodriver $URL" -wget "$URL" -O geckodriver.tar.gz -tar -xzf geckodriver.tar.gz -rm geckodriver.tar.gz +download_with_retries "$URL" "/tmp" geckodriver.tar.gz GECKODRIVER_DIR="/usr/local/share/gecko_driver" GECKODRIVER_BIN="$GECKODRIVER_DIR/geckodriver" mkdir -p $GECKODRIVER_DIR -mv "geckodriver" $GECKODRIVER_BIN +tar -xzf /tmp/geckodriver.tar.gz -C $GECKODRIVER_DIR chmod +x $GECKODRIVER_BIN ln -s "$GECKODRIVER_BIN" /usr/bin/ diff --git a/images/linux/scripts/installers/github-cli.sh b/images/linux/scripts/installers/github-cli.sh index baa614bcc..02f98daff 100644 --- a/images/linux/scripts/installers/github-cli.sh +++ b/images/linux/scripts/installers/github-cli.sh @@ -5,10 +5,12 @@ ## Must be run as non-root user after homebrew ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/install.sh + # Install GitHub CLI url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.assets[].browser_download_url|select(contains("linux") and contains("amd64") and contains(".deb"))') -wget $url -apt install ./gh_*_linux_amd64.deb -rm gh_*_linux_amd64.deb +download_with_retries $url "/tmp" +apt install /tmp/gh_*_linux_amd64.deb invoke_tests "CLI.Tools" "GitHub CLI" diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index 8c97946db..26ae16c12 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -71,7 +71,7 @@ ln -s /usr/share/apache-maven-3.6.3/bin/mvn /usr/bin/mvn # The release download URL looks like this: https://services.gradle.org/distributions/gradle-5.2.1-bin.zip # The release version is extracted from the download URL (i.e. 5.2.1). # After all of this, the release is downloaded, extracted, a symlink is created that points to it, and GRADLE_HOME is set. -wget -O gradleReleases.html https://gradle.org/releases/ +wget -qO gradleReleases.html https://gradle.org/releases/ gradleUrl=$(grep -m 1 -o "https:\/\/services.gradle.org\/distributions\/gradle-.*-bin\.zip" gradleReleases.html | head -1) gradleVersion=$(echo $gradleUrl | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') rm gradleReleases.html diff --git a/images/linux/scripts/installers/phantomjs.sh b/images/linux/scripts/installers/phantomjs.sh index c8b231408..0708810f2 100644 --- a/images/linux/scripts/installers/phantomjs.sh +++ b/images/linux/scripts/installers/phantomjs.sh @@ -4,12 +4,14 @@ ## Desc: Installs PhantomJS ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/install.sh + # Install PhantomJS apt-get install -y chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev PHANTOM_JS=phantomjs-2.1.1-linux-x86_64 -wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 -tar xjf $PHANTOM_JS.tar.bz2 -mv $PHANTOM_JS /usr/local/share +download_with_retries https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 "/tmp" +tar xjf /tmp/$PHANTOM_JS.tar.bz2 -C /usr/local/share ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin invoke_tests "Tools" "Phantomjs" diff --git a/images/linux/scripts/installers/selenium.sh b/images/linux/scripts/installers/selenium.sh index 55d436a53..85330be66 100644 --- a/images/linux/scripts/installers/selenium.sh +++ b/images/linux/scripts/installers/selenium.sh @@ -4,6 +4,9 @@ ## Desc: Installs selenium server ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/install.sh + # Determine latest selenium standalone server version SELENIUM_LATEST_VERSION_URL=https://api.github.com/repos/SeleniumHQ/selenium/releases/latest SELENIUM_VERSION=$(curl $SELENIUM_LATEST_VERSION_URL | jq '.name' | tr -d '"' | cut -d ' ' -f 2) @@ -12,7 +15,7 @@ SELENIUM_VERSION_MAJOR_MINOR=$(echo $SELENIUM_VERSION | cut -d '.' -f 1,2) # Download selenium standalone server echo "Downloading selenium-server-standalone v$SELENIUM_VERSION..." SELENIUM_JAR_NAME="selenium-server-standalone-$SELENIUM_VERSION.jar" -wget https://selenium-release.storage.googleapis.com/$SELENIUM_VERSION_MAJOR_MINOR/$SELENIUM_JAR_NAME +download_with_retries https://selenium-release.storage.googleapis.com/$SELENIUM_VERSION_MAJOR_MINOR/$SELENIUM_JAR_NAME SELENIUM_JAR_PATH="/usr/share/java/selenium-server-standalone.jar" mv $SELENIUM_JAR_NAME $SELENIUM_JAR_PATH