Skip to content

Commit

Permalink
Update dependencies from https://github.com/dotnet/arcade build 20210…
Browse files Browse the repository at this point in the history
…218.7 (#51334)

[master] Update dependencies from dotnet/arcade
  • Loading branch information
dotnet-maestro[bot] committed Feb 20, 2021
1 parent 1955f40 commit 3ee6a8f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 12 deletions.
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Expand Up @@ -3,17 +3,17 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.21116.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.21118.7">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1c06c541c2dc6edb3d652cb092785eb341ef8331</Sha>
<Sha>4957a6f3dd5f6fd1ca9ff06f9c50402f2e3b17e8</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.10.0-1.21113.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>69f354dd21df8dac374c35169bdabb9000cfdea3</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.21116.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.21118.7">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1c06c541c2dc6edb3d652cb092785eb341ef8331</Sha>
<Sha>4957a6f3dd5f6fd1ca9ff06f9c50402f2e3b17e8</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
43 changes: 37 additions & 6 deletions eng/common/tools.sh
Expand Up @@ -234,6 +234,28 @@ function InstallDotNet {
}
}

function with_retries {
local maxRetries=5
local retries=1
echo "Trying to run '$@' for maximum of $maxRetries attempts."
while [[ $((retries++)) -le $maxRetries ]]; do
"$@"

if [[ $? == 0 ]]; then
echo "Ran '$@' successfully."
return 0
fi

timeout=$((3**$retries-1))
echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
sleep $timeout
done

echo "Failed to execute '$@' for $maxRetries times." 1>&2

return 1
}

function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
Expand All @@ -246,13 +268,22 @@ function GetDotNetInstallScript {

# Use curl if available, otherwise use wget
if command -v curl > /dev/null; then
# first, try directly, if this fails we will retry with verbose logging
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
if command -v openssl &> /dev/null
then
echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation"
echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443
fi
echo "Will now retry the same URL with verbose logging."
with_retries curl "$install_script_url" -sSL --verbose --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
else
wget -q -O "$install_script" "$install_script_url" || {
else
with_retries wget -v -O "$install_script" "$install_script_url" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
Expand All @@ -267,7 +298,7 @@ function InitializeBuildTool {
if [[ -n "${_InitializeBuildTool:-}" ]]; then
return
fi

InitializeDotNetCli $restore

# return values
Expand Down
4 changes: 2 additions & 2 deletions global.json
Expand Up @@ -12,7 +12,7 @@
"xcopy-msbuild": "16.8.0-preview2.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.21116.3",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.21116.3"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.21118.7",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.21118.7"
}
}

0 comments on commit 3ee6a8f

Please sign in to comment.