Skip to content

Commit feb6ab1

Browse files
authored
Split nuget caches (Azure#20638)
1 parent 757fca8 commit feb6ab1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

eng/pipelines/templates/jobs/ci.mgmt.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
AgentImage: $(OSVmImage)
6262
- script: "echo $(system.pullrequest.pullrequestnumber), http://github.com/$(build.repository.id), http://github.com/$(build.repository.ID)"
6363
- template: /eng/pipelines/templates/steps/install-dotnet.yml
64+
parameters:
65+
NuGetCacheKey: Test
6466
- script: "dotnet msbuild mgmt.proj /v:n /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) /clp:ShowtimeStamp $(RPScopeArgs)"
6567
displayName: "Build & Run Tests"
6668
- task: PublishTestResults@2

eng/pipelines/templates/jobs/ci.tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
- ${{ each pair in step }}:
4848
${{ pair.key }}: ${{ pair.value }}
4949
- template: /eng/pipelines/templates/steps/install-dotnet.yml
50+
parameters:
51+
NuGetCacheKey: Test
5052
- script: >-
5153
dotnet test eng/service.proj --filter "(TestCategory!=Manually) & (TestCategory!=Live)" --framework $(TestTargetFramework)
5254
--logger "trx;LogFileName=$(TestTargetFramework).trx" --logger:"console;verbosity=normal"

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# All required SDKs/runtimes are available on DevOps agents
22
#steps: []
33
# Installation steps need to be uncommented when switching to a newer SDK that's not available on DevOps agents
4+
parameters:
5+
NuGetCacheKey: 'Build'
6+
47
steps:
58
- task: UseDotNet@2
69
displayName: 'Use .NET Core SDK'
@@ -15,8 +18,9 @@ steps:
1518
version: "2.1.x"
1619
- task: Cache@2
1720
inputs:
18-
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props'
21+
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props | ${{parameters.NuGetCacheKey}}'
1922
restoreKeys: |
23+
nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props
2024
nuget | "$(Agent.OS)"
2125
path: $(NUGET_PACKAGES)
2226
displayName: Cache NuGet packages

0 commit comments

Comments
 (0)