Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>2021-10-01 16:33:46 +0300
committerGitHub <noreply@github.com>2021-10-01 16:33:46 +0300
commit97ae5ccd64fa00feee25c71257cea77370810865 (patch)
tree9a1bcb68c21aa0fca3081baffd4ac6de8c1dd6f6 /eng/common/tools.ps1
parent70cb44e6997b88126b50268f0c0a4db9cad6aa17 (diff)
[main] Update dependencies from 9 repositories (#59856)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Diffstat (limited to 'eng/common/tools.ps1')
-rw-r--r--eng/common/tools.ps126
1 files changed, 18 insertions, 8 deletions
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 02347914f5d..44484289943 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -709,14 +709,7 @@ function MSBuild() {
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
}
- if ($ci) {
- $env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true'
- $env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6
- $env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000
- Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true'
- Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6'
- Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'
- }
+ Enable-Nuget-EnhancedRetry
$toolsetBuildProject = InitializeToolset
$basePath = Split-Path -parent $toolsetBuildProject
@@ -764,6 +757,8 @@ function MSBuild-Core() {
}
}
+ Enable-Nuget-EnhancedRetry
+
$buildTool = InitializeBuildTool
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
@@ -904,3 +899,18 @@ function Try-LogClientIpAddress()
Write-Host "Unable to get this machine's effective IP address for logging: $_"
}
}
+
+#
+# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic.
+#
+function Enable-Nuget-EnhancedRetry() {
+ if ($ci) {
+ Write-Host "Setting NUGET enhanced retry environment variables"
+ $env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true'
+ $env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6
+ $env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000
+ Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true'
+ Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6'
+ Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'
+ }
+}