Skip to content

Commit bbf093f

Browse files
authored
Try pipeline caching (Azure#20603)
1 parent 5b5a680 commit bbf093f

File tree

7 files changed

+22
-28
lines changed

7 files changed

+22
-28
lines changed

doc/ApiDocGeneration/assets/docgen.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<ECMA2YmlVersion>1.0.644-alpha</ECMA2YmlVersion>
99
<PopImportVersion>1.0.0</PopImportVersion>
1010
<NuGetPackageRoot>$(UserProfile)\.nuget\packages</NuGetPackageRoot>
11+
<NuGetPackageRoot Condition="'$(NUGET_PACKAGES)' != ''">$(NUGET_PACKAGES)</NuGetPackageRoot>
1112
</PropertyGroup>
1213
<ItemGroup>
1314
<PackageReference Include="Microsoft.DocAsCode.ECMA2Yaml" Version="$(ECMA2YmlVersion)" />

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ jobs:
1010
if "$(BuildConfiguration)" == "Release" (set SkipTests=true) else (set SkipTests=false)
1111
dotnet msbuild mgmt.proj /v:m /t:CreateNugetPackage /p:Configuration=$(BuildConfiguration) /p:SkipTests=%SkipTests% /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) $(loggingArgs) $(RPScopeArgs)"
1212
displayName: "Build & Package"
13-
env:
14-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
15-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
1613
- task: PowerShell@2
1714
displayName: "Verify generated code"
1815
condition: and(succeeded(), ne(variables['System.TeamProject'],'internal'))
@@ -66,9 +63,6 @@ jobs:
6663
- template: /eng/pipelines/templates/steps/install-dotnet.yml
6764
- script: "dotnet msbuild mgmt.proj /v:n /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) /clp:ShowtimeStamp $(RPScopeArgs)"
6865
displayName: "Build & Run Tests"
69-
env:
70-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
71-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
7266
- task: PublishTestResults@2
7367
condition: succeededOrFailed()
7468
inputs:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ jobs:
5757
/p:Configuration=$(BuildConfiguration) $(ConvertToProjectReferenceOption)
5858
/p:CollectCoverage=$(CollectCoverage) /p:CodeCoverageDirectory=${{ parameters.ServiceDirectory }}
5959
displayName: "Build & Test ($(TestTargetFramework))"
60-
env:
61-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
62-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
6360
- task: PublishTestResults@2
6461
condition: always()
6562
displayName: "Publish Results ($(TestTargetFramework))"

eng/pipelines/templates/jobs/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ jobs:
7777
/p:CommitSHA=$(Build.SourceVersion)
7878
/p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory)
7979
displayName: "Build and Package"
80-
env:
81-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
82-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
8380
8481
- template: /eng/common/pipelines/templates/steps/create-apireview.yml
8582
parameters:
@@ -133,9 +130,6 @@ jobs:
133130
- template: /eng/pipelines/templates/steps/install-dotnet.yml
134131
- task: PowerShell@2
135132
displayName: "Verify generated code"
136-
env:
137-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
138-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
139133
inputs:
140134
filePath: "eng/scripts/CodeChecks.ps1"
141135
arguments: >

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ jobs:
118118
119119
displayName: "Build & Test (all tests for $(TestTargetFramework))"
120120
env:
121-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
122-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
123121
AZURE_TEST_MODE: $(TestMode)
124122
${{ each var in parameters.EnvVars }}:
125123
${{ var.key }}: ${{ var.value }}

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

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
#steps: []
33
# Installation steps need to be uncommented when switching to a newer SDK that's not available on DevOps agents
44
steps:
5-
- task: UseDotNet@2
6-
displayName: 'Use .NET Core SDK'
7-
inputs:
8-
useGlobalJson: true
9-
performMultiLevelLookup: true
10-
- task: UseDotNet@2
11-
condition: ne(variables['Agent.OS'], 'Windows_NT') # Windows supports MultiLevelLookup and doesn't need explicit framework installation
12-
displayName: 'Use .NET Core 2.1 runtime'
13-
inputs:
14-
packageType: runtime
15-
version: "2.1.x"
5+
- task: UseDotNet@2
6+
displayName: 'Use .NET Core SDK'
7+
inputs:
8+
useGlobalJson: true
9+
performMultiLevelLookup: true
10+
- task: UseDotNet@2
11+
condition: ne(variables['Agent.OS'], 'Windows_NT') # Windows supports MultiLevelLookup and doesn't need explicit framework installation
12+
displayName: 'Use .NET Core 2.1 runtime'
13+
inputs:
14+
packageType: runtime
15+
version: "2.1.x"
16+
- task: Cache@2
17+
inputs:
18+
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props'
19+
restoreKeys: |
20+
nuget | "$(Agent.OS)"
21+
path: $(NUGET_PACKAGES)
22+
displayName: Cache NuGet packages

eng/pipelines/templates/variables/globals.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ variables:
1111
DocFxVersion: 'v2.56.1'
1212
CollectCoverage: false
1313
DECODE_PERCENTS: false
14+
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages/
15+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
16+
DOTNET_CLI_TELEMETRY_OPTOUT: 1

0 commit comments

Comments
 (0)