|
|
@@ -30,49 +30,24 @@ RED="\033[0;31m"
|
|
|
YELLOW="\033[0;33m"
|
|
|
MAGENTA="\033[0;95m"
|
|
|
|
|
|
-curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
|
|
|
-if [ $? -ne 0 ]; then
|
|
|
- download_retries=3
|
|
|
- while [ $download_retries -gt 0 ]; do
|
|
|
- curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
- let download_retries=download_retries-1
|
|
|
- echo -e "${YELLOW}Failed to download dotnet-install.sh. Retries left: $download_retries.${RESET}"
|
|
|
- else
|
|
|
- download_retries=0
|
|
|
- fi
|
|
|
- done
|
|
|
-fi
|
|
|
-
|
|
|
-# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
|
|
|
-chmod +x "dotnet-install.sh"; sync
|
|
|
-
|
|
|
-./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
|
|
|
-if [ $? -ne 0 ]; then
|
|
|
- sdk_retries=3
|
|
|
- while [ $sdk_retries -gt 0 ]; do
|
|
|
- ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
- let sdk_retries=sdk_retries-1
|
|
|
- echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}"
|
|
|
- else
|
|
|
- sdk_retries=0
|
|
|
- fi
|
|
|
- done
|
|
|
-fi
|
|
|
-
|
|
|
-./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
|
|
|
-if [ $? -ne 0 ]; then
|
|
|
- runtime_retries=3
|
|
|
- while [ $runtime_retries -gt 0 ]; do
|
|
|
- ./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
- let runtime_retries=runtime_retries-1
|
|
|
- echo -e "${YELLOW}Failed to install .NET Core runtime $version. Retries left: $runtime_retries.${RESET}"
|
|
|
- else
|
|
|
- runtime_retries=0
|
|
|
- fi
|
|
|
- done
|
|
|
+. eng/common/tools.sh
|
|
|
+InstallDotNet $DOTNET_ROOT $dotnet_sdk_version "" "" true || {
|
|
|
+ exit_code=$?
|
|
|
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
|
|
+ ExitWithExitCode $exit_code
|
|
|
+}
|
|
|
+if [[ -z "${11:-}" ]]; then
|
|
|
+ InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true || {
|
|
|
+ exit_code=$?
|
|
|
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
|
|
+ ExitWithExitCode $exit_code
|
|
|
+ }
|
|
|
+else
|
|
|
+ InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true https://dotnetclimsrc.blob.core.windows.net/dotnet ${11} || {
|
|
|
+ exit_code=$?
|
|
|
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
|
|
+ ExitWithExitCode $exit_code
|
|
|
+ }
|
|
|
fi
|
|
|
|
|
|
if [ -e /proc/self/coredump_filter ]; then
|
|
|
@@ -82,7 +57,7 @@ if [ -e /proc/self/coredump_filter ]; then
|
|
|
echo -n 0x3F > /proc/self/coredump_filter
|
|
|
fi
|
|
|
|
|
|
-# dontet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
|
|
|
+# dotnet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
|
|
|
sync
|
|
|
|
|
|
exit_code=0
|