Skip to content

Commit

Permalink
[CI] Enhance build Pipeline Reliability with Retry Logic and Improved…
Browse files Browse the repository at this point in the history
… Error Messaging (#36529)

* update pipeline with retry

* remove tests
  • Loading branch information
lei9444 authored Dec 24, 2024
1 parent bb637c1 commit fbd72cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .pipelines/v2/templates/steps-ensure-dotnet-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ parameters:
steps:
- pwsh: |-
curl.exe -J -L -O "https://dot.net/v1/dotnet-install.ps1"
if (-not (Test-Path dotnet-install.ps1)) {
Write-Error "Failed to download dotnet-install.ps1"
exit 1
}
$NEW_DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet"
& ./dotnet-install.ps1 -Channel "${{parameters.version}}" -InstallDir $NEW_DOTNET_ROOT
Write-Host "##vso[task.setvariable variable=DOTNET_ROOT]${NEW_DOTNET_ROOT}"
Expand All @@ -25,3 +29,4 @@ steps:
displayName: "Install .NET ${{parameters.version}} SDK"
${{ else }}:
displayName: "Install .NET ${{parameters.version}}"
retryCountOnTaskFailure: 3

0 comments on commit fbd72cc

Please sign in to comment.