Update dependencies from https://github.com/dotnet/arcade build 20200206.12 (#6311)
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20106.12
This commit is contained in:
parent
486e1009f0
commit
9b723d9809
6 changed files with 72 additions and 24 deletions
|
@ -104,9 +104,9 @@
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ProductDependencies>
|
</ProductDependencies>
|
||||||
<ToolsetDependencies>
|
<ToolsetDependencies>
|
||||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20105.2">
|
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20106.12">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>b65df96ccb820fd5f7ea226aeba310485f395130</Sha>
|
<Sha>50f7059d3a7a83ae1919516755b9ca92c67805e8</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ToolsetDependencies>
|
</ToolsetDependencies>
|
||||||
</Dependencies>
|
</Dependencies>
|
||||||
|
|
|
@ -46,7 +46,7 @@ stages:
|
||||||
buildId: $(AzDOBuildId)
|
buildId: $(AzDOBuildId)
|
||||||
downloadType: 'specific'
|
downloadType: 'specific'
|
||||||
itemPattern: |
|
itemPattern: |
|
||||||
PDBArtifacts/**
|
PdbArtifacts/**
|
||||||
BlobArtifacts/**
|
BlobArtifacts/**
|
||||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ stages:
|
||||||
buildId: $(AzDOBuildId)
|
buildId: $(AzDOBuildId)
|
||||||
downloadType: 'specific'
|
downloadType: 'specific'
|
||||||
itemPattern: |
|
itemPattern: |
|
||||||
PDBArtifacts/**
|
PdbArtifacts/**
|
||||||
BlobArtifacts/**
|
BlobArtifacts/**
|
||||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,33 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||||
if (!(Test-Path $installScript)) {
|
if (!(Test-Path $installScript)) {
|
||||||
Create-Directory $dotnetRoot
|
Create-Directory $dotnetRoot
|
||||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||||
Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
|
|
||||||
|
$maxRetries = 5
|
||||||
|
$retries = 1
|
||||||
|
|
||||||
|
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
|
||||||
|
|
||||||
|
while($true) {
|
||||||
|
try {
|
||||||
|
Write-Host "GET $uri"
|
||||||
|
Invoke-WebRequest $uri -OutFile $installScript
|
||||||
|
break
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Failed to download '$uri'"
|
||||||
|
Write-Error $_.Exception.Message -ErrorAction Continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (++$retries -le $maxRetries) {
|
||||||
|
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||||
|
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||||
|
Start-Sleep -Seconds $delayInSeconds
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw "Unable to download file in $maxRetries attempts."
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $installScript
|
return $installScript
|
||||||
|
|
|
@ -218,6 +218,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=$((2**$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 {
|
function GetDotNetInstallScript {
|
||||||
local root=$1
|
local root=$1
|
||||||
local install_script="$root/dotnet-install.sh"
|
local install_script="$root/dotnet-install.sh"
|
||||||
|
@ -230,13 +252,13 @@ function GetDotNetInstallScript {
|
||||||
|
|
||||||
# Use curl if available, otherwise use wget
|
# Use curl if available, otherwise use wget
|
||||||
if command -v curl > /dev/null; then
|
if command -v curl > /dev/null; then
|
||||||
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
|
with_retries curl "$install_script_url" -isSLv --retry 10 --create-dirs -o "$install_script" || {
|
||||||
local exit_code=$?
|
local exit_code=$?
|
||||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||||
ExitWithExitCode $exit_code
|
ExitWithExitCode $exit_code
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wget -q -O "$install_script" "$install_script_url" || {
|
with_retries wget -v -O "$install_script" "$install_script_url" || {
|
||||||
local exit_code=$?
|
local exit_code=$?
|
||||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||||
ExitWithExitCode $exit_code
|
ExitWithExitCode $exit_code
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
"dotnet": "5.0.100-alpha1-015949"
|
"dotnet": "5.0.100-alpha1-015949"
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20105.2"
|
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20106.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue