diff --git a/images/linux/scripts/base/apt.sh b/images/linux/scripts/base/apt.sh index f50866b55..725757498 100644 --- a/images/linux/scripts/base/apt.sh +++ b/images/linux/scripts/base/apt.sh @@ -40,4 +40,4 @@ apt-get install jq # Install apt-fast using quick-install.sh # https://github.com/ilikenwf/apt-fast -bash -c "$(curl -sL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)" +bash -c "$(curl -fsSL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)" diff --git a/images/linux/scripts/helpers/install.sh b/images/linux/scripts/helpers/install.sh index 9fe39be2b..55aa7816f 100644 --- a/images/linux/scripts/helpers/install.sh +++ b/images/linux/scripts/helpers/install.sh @@ -72,7 +72,7 @@ get_github_package_download_url() { local VERSION=$3 local SEARCH_IN_COUNT="100" - json=$(curl -sSL "https://api.github.com/repos/${REPO_ORG}/releases?per_page=${SEARCH_IN_COUNT}") + json=$(curl -fsSL "https://api.github.com/repos/${REPO_ORG}/releases?per_page=${SEARCH_IN_COUNT}") if [ -n "$VERSION" ]; then tagName=$(echo $json | jq -r '.[] | select(.prerelease==false).tag_name' | sort --unique --version-sort | egrep -v ".*-[a-z]|beta" | egrep "\w*${VERSION}" | tail -1) diff --git a/images/linux/scripts/installers/azure-cli.sh b/images/linux/scripts/installers/azure-cli.sh index 45a32b9cd..bca11b8b3 100644 --- a/images/linux/scripts/installers/azure-cli.sh +++ b/images/linux/scripts/installers/azure-cli.sh @@ -5,7 +5,7 @@ ################################################################################ # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) -curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash +curl -fsSL https://aka.ms/InstallAzureCLIDeb | sudo bash echo "azure-cli https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt" >> $HELPER_SCRIPTS/apt-sources.txt rm -f /etc/apt/sources.list.d/azure-cli.list rm -f /etc/apt/sources.list.d/azure-cli.list.save diff --git a/images/linux/scripts/installers/cmake.sh b/images/linux/scripts/installers/cmake.sh index 51aab6250..4bf5ca814 100644 --- a/images/linux/scripts/installers/cmake.sh +++ b/images/linux/scripts/installers/cmake.sh @@ -13,7 +13,7 @@ if command -v cmake; then echo "cmake is already installed" else downloadUrl=$(get_github_package_download_url "Kitware/CMake" "endswith(\"inux-x86_64.sh\")") - curl -sL ${downloadUrl} -o cmakeinstall.sh \ + curl -fsSL ${downloadUrl} -o cmakeinstall.sh \ && chmod +x cmakeinstall.sh \ && ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \ && rm cmakeinstall.sh diff --git a/images/linux/scripts/installers/codeql-bundle.sh b/images/linux/scripts/installers/codeql-bundle.sh index f6b6f0612..23daa4ef1 100644 --- a/images/linux/scripts/installers/codeql-bundle.sh +++ b/images/linux/scripts/installers/codeql-bundle.sh @@ -7,7 +7,7 @@ source $HELPER_SCRIPTS/install.sh # Retrieve the CLI versions and bundle tags of the latest two CodeQL bundles. -base_url="$(curl -sSL https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json)" +base_url="$(curl -fsSL https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json)" codeql_tag_name="$(echo "$base_url" | jq -r '.bundleVersion')" codeql_cli_version="$(echo "$base_url" | jq -r '.cliVersion')" prior_codeql_tag_name="$(echo "$base_url" | jq -r '.priorBundleVersion')" diff --git a/images/linux/scripts/installers/docker-compose.sh b/images/linux/scripts/installers/docker-compose.sh index 40db139ca..019d0937e 100644 --- a/images/linux/scripts/installers/docker-compose.sh +++ b/images/linux/scripts/installers/docker-compose.sh @@ -6,7 +6,7 @@ # Install docker-compose v1 from releases URL="https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64" -curl -L $URL -o /usr/local/bin/docker-compose +curl -fsSL $URL -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose invoke_tests "Tools" "Docker-compose v1" diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 3db9ae3de..3e66905f7 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -52,7 +52,7 @@ fi # Install amazon-ecr-credential-helper aws_latest_release_url="https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/releases/latest" -aws_helper_url=$(curl "${authString[@]}" -sL $aws_latest_release_url | jq -r '.body' | awk -F'[()]' '/linux-amd64/ {print $2}') +aws_helper_url=$(curl "${authString[@]}" -fsSL $aws_latest_release_url | jq -r '.body' | awk -F'[()]' '/linux-amd64/ {print $2}') download_with_retries "$aws_helper_url" "/usr/bin" docker-credential-ecr-login chmod +x /usr/bin/docker-credential-ecr-login diff --git a/images/linux/scripts/installers/git.sh b/images/linux/scripts/installers/git.sh index 2d2a030a7..b02e020c3 100644 --- a/images/linux/scripts/installers/git.sh +++ b/images/linux/scripts/installers/git.sh @@ -22,7 +22,7 @@ cat <> /etc/gitconfig EOF # Install git-lfs -curl -s $GIT_LFS_REPO/script.deb.sh | bash +curl -fsSL $GIT_LFS_REPO/script.deb.sh | bash apt-get install -y git-lfs # Install git-ftp diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index fe775e138..4a7f63478 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -17,7 +17,7 @@ setEtcEnvironmentVariable "BOOTSTRAP_HASKELL_NONINTERACTIVE" $BOOTSTRAP_HASKELL_ setEtcEnvironmentVariable "GHCUP_INSTALL_BASE_PREFIX" $GHCUP_INSTALL_BASE_PREFIX # Install GHCup -curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh > /dev/null 2>&1 || true +curl --proto '=https' --tlsv1.2 -fsSL https://get-ghcup.haskell.org | sh > /dev/null 2>&1 || true export PATH="$ghcup_bin:$PATH" prependEtcEnvironmentPath $ghcup_bin @@ -39,6 +39,6 @@ chmod -R 777 $GHCUP_INSTALL_BASE_PREFIX/.ghcup ln -s $GHCUP_INSTALL_BASE_PREFIX/.ghcup /etc/skel/.ghcup # Install the latest stable release of haskell stack -curl -sSL https://get.haskellstack.org/ | sh +curl -fsSL https://get.haskellstack.org/ | sh invoke_tests "Haskell" diff --git a/images/linux/scripts/installers/heroku.sh b/images/linux/scripts/installers/heroku.sh index fa1e2d4be..55637a1ce 100644 --- a/images/linux/scripts/installers/heroku.sh +++ b/images/linux/scripts/installers/heroku.sh @@ -5,6 +5,6 @@ ################################################################################ # Install Heroku CLI -curl https://cli-assets.heroku.com/install.sh | sh +curl -fsSL https://cli-assets.heroku.com/install.sh | sh invoke_tests "Tools" "Heroku" \ No newline at end of file diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index 989a6e74b..12348f24f 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -136,7 +136,7 @@ ln -s /usr/share/apache-maven-${mavenVersion}/bin/mvn /usr/bin/mvn # Install Gradle # This script founds the latest gradle release from https://services.gradle.org/versions/all # The release is downloaded, extracted, a symlink is created that points to it, and GRADLE_HOME is set. -gradleJson=$(curl -s https://services.gradle.org/versions/all) +gradleJson=$(curl -fsSL https://services.gradle.org/versions/all) gradleLatestVersion=$(echo ${gradleJson} | jq -r '.[] | select(.version | contains("-") | not).version' | sort -V | tail -n1) gradleDownloadUrl=$(echo ${gradleJson} | jq -r ".[] | select(.version==\"$gradleLatestVersion\") | .downloadUrl") echo "gradleUrl=${gradleDownloadUrl}" diff --git a/images/linux/scripts/installers/julia.sh b/images/linux/scripts/installers/julia.sh index 90bbfeb12..715a5ea36 100644 --- a/images/linux/scripts/installers/julia.sh +++ b/images/linux/scripts/installers/julia.sh @@ -8,7 +8,7 @@ source $HELPER_SCRIPTS/install.sh # get the latest julia version -json=$(curl -sL "https://julialang-s3.julialang.org/bin/versions.json") +json=$(curl -fsSL "https://julialang-s3.julialang.org/bin/versions.json") julia_version=$(echo $json | jq -r '.[].files[] | select(.triplet=="x86_64-linux-gnu" and (.version | contains("-") | not)).version' | sort -V | tail -n1) # download julia archive diff --git a/images/linux/scripts/installers/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh index 83be26728..79a8c2802 100644 --- a/images/linux/scripts/installers/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -9,24 +9,24 @@ source $HELPER_SCRIPTS/install.sh # Install KIND URL=$(get_github_package_download_url "kubernetes-sigs/kind" "contains(\"kind-linux-amd64\")") -curl -L -o /usr/local/bin/kind $URL +curl -fsSL -o /usr/local/bin/kind $URL chmod +x /usr/local/bin/kind ## Install kubectl -KUBECTL_VERSION=$(curl -L -s "https://dl.k8s.io/release/stable.txt") -curl -o /usr/local/bin/kubectl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" +KUBECTL_VERSION=$(curl -fsSL "https://dl.k8s.io/release/stable.txt") +curl -fsSL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" chmod +x /usr/local/bin/kubectl # Install Helm -curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash +curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash # Install minikube -curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 +curl -fsSL -O https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube # Install kustomize download_url="https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" -curl -s "$download_url" | bash +curl -fsSL "$download_url" | bash mv kustomize /usr/local/bin invoke_tests "Tools" "Kubernetes tools" diff --git a/images/linux/scripts/installers/leiningen.sh b/images/linux/scripts/installers/leiningen.sh index 045ada42d..2197b02ef 100644 --- a/images/linux/scripts/installers/leiningen.sh +++ b/images/linux/scripts/installers/leiningen.sh @@ -5,7 +5,7 @@ ################################################################################ LEIN_BIN=/usr/local/bin/lein -curl -s https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > $LEIN_BIN +curl -fsSL https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > $LEIN_BIN chmod 0755 $LEIN_BIN # Run lein to trigger self-install diff --git a/images/linux/scripts/installers/microsoft-edge.sh b/images/linux/scripts/installers/microsoft-edge.sh index dc3ef46f6..5cf105cb2 100644 --- a/images/linux/scripts/installers/microsoft-edge.sh +++ b/images/linux/scripts/installers/microsoft-edge.sh @@ -35,7 +35,7 @@ EDGE_VERSION_MAJOR=$(echo $EDGE_VERSION | cut -d'.' -f 1) EDGE_DRIVER_VERSION_URL="https://msedgedriver.azureedge.net/LATEST_RELEASE_${EDGE_VERSION_MAJOR}_LINUX" # Convert a resulting file to normal UTF-8 -EDGE_DRIVER_LATEST_VERSION=$(curl -s "$EDGE_DRIVER_VERSION_URL" | iconv -f utf-16 -t utf-8 | tr -d '\r') +EDGE_DRIVER_LATEST_VERSION=$(curl -fsSL "$EDGE_DRIVER_VERSION_URL" | iconv -f utf-16 -t utf-8 | tr -d '\r') EDGEDRIVER_URL="https://msedgedriver.azureedge.net/${EDGE_DRIVER_LATEST_VERSION}/edgedriver_linux64.zip" download_with_retries $EDGEDRIVER_URL "/tmp" "edgedriver_linux64.zip" diff --git a/images/linux/scripts/installers/miniconda.sh b/images/linux/scripts/installers/miniconda.sh index 02a370b2c..3a3e7d295 100644 --- a/images/linux/scripts/installers/miniconda.sh +++ b/images/linux/scripts/installers/miniconda.sh @@ -5,7 +5,7 @@ ################################################################################ # Install Miniconda -curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \ +curl -fsSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \ && chmod +x miniconda.sh \ && ./miniconda.sh -b -p /usr/share/miniconda \ && rm miniconda.sh diff --git a/images/linux/scripts/installers/nodejs.sh b/images/linux/scripts/installers/nodejs.sh index 97b82fed5..46ef75b8c 100644 --- a/images/linux/scripts/installers/nodejs.sh +++ b/images/linux/scripts/installers/nodejs.sh @@ -9,7 +9,7 @@ source $HELPER_SCRIPTS/install.sh # Install default Node.js defaultVersion=$(get_toolset_value '.node.default') -curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n +curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n bash ~/n $defaultVersion # Install node modules diff --git a/images/linux/scripts/installers/nvm.sh b/images/linux/scripts/installers/nvm.sh index ddb146119..71ae4b8d6 100644 --- a/images/linux/scripts/installers/nvm.sh +++ b/images/linux/scripts/installers/nvm.sh @@ -6,8 +6,8 @@ export NVM_DIR="/etc/skel/.nvm" mkdir $NVM_DIR -VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name') -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash +VERSION=$(curl -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name') +curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash echo 'NVM_DIR=$HOME/.nvm' | tee -a /etc/environment echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee -a /etc/skel/.bash_profile [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" diff --git a/images/linux/scripts/installers/packer.sh b/images/linux/scripts/installers/packer.sh index 34c7f01eb..2433963cf 100644 --- a/images/linux/scripts/installers/packer.sh +++ b/images/linux/scripts/installers/packer.sh @@ -7,7 +7,7 @@ source $HELPER_SCRIPTS/install.sh # Install Packer -URL=$(curl -s https://api.releases.hashicorp.com/v1/releases/packer/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url') +URL=$(curl -fsSL https://api.releases.hashicorp.com/v1/releases/packer/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url') ZIP_NAME="packer_linux_amd64.zip" download_with_retries "${URL}" "/tmp" "${ZIP_NAME}" unzip -qq "/tmp/${ZIP_NAME}" -d /usr/local/bin diff --git a/images/linux/scripts/installers/pulumi.sh b/images/linux/scripts/installers/pulumi.sh index e0081349f..9c15de3f2 100644 --- a/images/linux/scripts/installers/pulumi.sh +++ b/images/linux/scripts/installers/pulumi.sh @@ -8,7 +8,7 @@ source $HELPER_SCRIPTS/install.sh # Install Pulumi -VERSION=$(curl --fail --silent -L "https://www.pulumi.com/latest-version") +VERSION=$(curl -fsSL "https://www.pulumi.com/latest-version") TARBALL_URL="https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-linux-x64.tar.gz" download_with_retries ${TARBALL_URL} "/tmp" pulumi-v${VERSION}.tar.gz tar --strip=1 -xf /tmp/pulumi-v${VERSION}.tar.gz -C /usr/local/bin diff --git a/images/linux/scripts/installers/pypy.sh b/images/linux/scripts/installers/pypy.sh index 547c72020..32cb2ffc3 100644 --- a/images/linux/scripts/installers/pypy.sh +++ b/images/linux/scripts/installers/pypy.sh @@ -74,7 +74,7 @@ function InstallPyPy } # Installation PyPy -pypyVersions=$(curl https://downloads.python.org/pypy/versions.json) +pypyVersions=$(curl -fsSL https://downloads.python.org/pypy/versions.json) toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .versions[]') for toolsetVersion in $toolsetVersions; do diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index bf9797475..5c25fe69c 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -22,7 +22,7 @@ fi apt-get install -y libz-dev openssl libssl-dev echo "Install Ruby from toolset..." -PACKAGE_TAR_NAMES=$(curl -s "https://api.github.com/repos/ruby/ruby-builder/releases/latest" | jq -r '.assets[].name') +PACKAGE_TAR_NAMES=$(curl -fsSL "https://api.github.com/repos/ruby/ruby-builder/releases/latest" | jq -r '.assets[].name') TOOLSET_VERSIONS=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .versions[]') PLATFORM_VERSION=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .platform_version') RUBY_PATH="$AGENT_TOOLSDIRECTORY/Ruby" diff --git a/images/linux/scripts/installers/rust.sh b/images/linux/scripts/installers/rust.sh index 5e0b46588..adec5a65a 100644 --- a/images/linux/scripts/installers/rust.sh +++ b/images/linux/scripts/installers/rust.sh @@ -11,7 +11,7 @@ source $HELPER_SCRIPTS/os.sh export RUSTUP_HOME=/etc/skel/.rustup export CARGO_HOME=/etc/skel/.cargo -curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal +curl -fsSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=stable --profile=minimal # Initialize environment variables source $CARGO_HOME/env diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index f482d6021..ef7a7c09f 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -9,7 +9,7 @@ source $HELPER_SCRIPTS/install.sh # Install image_label="$(lsb_release -rs)" -swift_version=$(curl -s "https://api.github.com/repos/apple/swift/releases/latest" | jq -r '.tag_name | match("[0-9.]+").string') +swift_version=$(curl -fsSL "https://api.github.com/repos/apple/swift/releases/latest" | jq -r '.tag_name | match("[0-9.]+").string') swift_tar_name="swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz" swift_tar_url="https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/$swift_tar_name" diff --git a/images/linux/scripts/installers/terraform.sh b/images/linux/scripts/installers/terraform.sh index bed616fb8..0e8f55537 100644 --- a/images/linux/scripts/installers/terraform.sh +++ b/images/linux/scripts/installers/terraform.sh @@ -7,7 +7,7 @@ source $HELPER_SCRIPTS/install.sh # Install Terraform -URL=$(curl -s https://api.releases.hashicorp.com/v1/releases/terraform/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url') +URL=$(curl -fsSL https://api.releases.hashicorp.com/v1/releases/terraform/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url') ZIP_NAME="terraform_linux_amd64.zip" download_with_retries "${URL}" "/tmp" "${ZIP_NAME}" unzip -qq "/tmp/${ZIP_NAME}" -d /usr/local/bin diff --git a/images/linux/scripts/installers/zstd.sh b/images/linux/scripts/installers/zstd.sh index 8c738f4c0..d845b97f9 100644 --- a/images/linux/scripts/installers/zstd.sh +++ b/images/linux/scripts/installers/zstd.sh @@ -8,7 +8,7 @@ source $HELPER_SCRIPTS/install.sh apt-get install -y liblz4-dev -release_tag=$(curl https://api.github.com/repos/facebook/zstd/releases/latest | jq -r '.tag_name') +release_tag=$(curl -fsSL https://api.github.com/repos/facebook/zstd/releases/latest | jq -r '.tag_name') zstd_tar_name=zstd-${release_tag//v}.tar.gz URL=https://github.com/facebook/zstd/releases/download/${release_tag}/${zstd_tar_name} download_with_retries "${URL}" "/tmp" "${zstd_tar_name}"