Skip to content

Commit 9770185

Browse files
authored
Clean-up conditions and continue on caching error (Azure#25806)
There has been some recent issues with the caching tasks where it fails and blocks the build so setting it to continueOnError:true as it should never block the build. Also cleaned up some of the other conditions so they only run on successful builds instead of always.
1 parent 08c2b0b commit 9770185

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

eng/pipelines/templates/steps/install-dotnet.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ steps:
88
inputs:
99
solution: eng/InstallDevopsLogger.proj
1010
msbuildArguments: /p:WorkFolder="$(Agent.WorkFolder)" /p:BuildDirectory="$(Agent.BuildDirectory)"
11-
#Installation steps need to be uncommented when switching to a newer SDK that's not available on DevOps agents
11+
# Installation steps need to be uncommented when switching to a newer SDK that's not available on DevOps agents
1212
- task: UseDotNet@2
1313
displayName: 'Use .NET Core SDK'
1414
inputs:
1515
useGlobalJson: true
1616
performMultiLevelLookup: true
1717
# test-proxy requires ASP.NET Core 5.0 runtime
1818
- task: UseDotNet@2
19-
condition: ne(variables['Agent.OS'], 'Windows_NT') # Windows supports MultiLevelLookup and doesn't need explicit framework installation
19+
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) # Windows supports MultiLevelLookup and doesn't need explicit framework installation
2020
displayName: 'Use .NET Core 5.0 SDK'
2121
inputs:
2222
packageType: sdk
2323
performMultiLevelLookup: true
2424
version: "5.0.x"
2525
- task: UseDotNet@2
26-
condition: ne(variables['Agent.OS'], 'Windows_NT') # Windows supports MultiLevelLookup and doesn't need explicit framework installation
26+
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) # Windows supports MultiLevelLookup and doesn't need explicit framework installation
2727
displayName: 'Use .NET Core 3.1 SDK'
2828
inputs:
2929
# AspNetCore runtime pack can't be installed outside of SDK and we need it for intergation tests
@@ -34,5 +34,6 @@ steps:
3434
inputs:
3535
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props | ${{parameters.NuGetCacheKey}}'
3636
path: $(NUGET_PACKAGES)
37-
condition: ${{parameters.EnableNuGetCache}}
37+
condition: and(succeeded(), ${{parameters.EnableNuGetCache}})
38+
continueOnError: true
3839
displayName: Cache NuGet packages

0 commit comments

Comments
 (0)