From e0ac08405bb54355ccdb6d8f234d756888fed38c Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Wed, 4 Mar 2026 13:21:25 -0600 Subject: [PATCH 1/2] Centralize pool selection in CI pipeline variables Import pool-providers.yml and define PoolName/PoolDemands variables to replace 4 duplicated conditional pool blocks. Also use $(DncEngPublicBuildPool) for the Linux job's public pool name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .vsts-dotnet-ci.yml | 59 +++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index e8afb2cbf2f..235554c8c83 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -4,6 +4,7 @@ trigger: - vs* variables: +- template: /eng/common/templates/variables/pool-providers.yml - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - group: AzureDevOps-Artifact-Feeds-Pats - name: cfsNugetWarnLevel @@ -12,6 +13,25 @@ variables: value: none - name: NugetSecurityAnalysisWarningLevel value: none +# Centralized pool configuration to avoid duplicating conditional blocks across jobs. +- ${{ if eq(variables['System.TeamProject'], 'public') }}: + - name: WindowsPoolName + value: $(DncEngPublicBuildPool) + - name: WindowsPoolDemands + value: ImageOverride -equals windows.vs2026preview.scout.amd64.open + - name: LinuxPoolName + value: $(DncEngPublicBuildPool) + - name: LinuxPoolDemands + value: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - name: WindowsPoolName + value: VSEng-MicroBuildVSStable + - name: WindowsPoolDemands + value: agent.os -equals Windows_NT + - name: LinuxPoolName + value: Azure Pipelines + - name: LinuxPoolDemands + value: ImageOverride -equals ubuntu-latest jobs: - job: CheckVersionBumpOnReleaseBranches @@ -65,12 +85,8 @@ jobs: coverageReportName: WindowsFullFrameworkCoverage displayName: "Windows Full" pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2026preview.scout.amd64.open - ${{ if ne(variables['System.TeamProject'], 'public') }}: - name: VSEng-MicroBuildVSStable - demands: agent.os -equals Windows_NT + name: $(WindowsPoolName) + demands: $(WindowsPoolDemands) timeoutInMinutes: 120 steps: - template: azure-pipelines/check-documentation-only-change.yml @@ -177,12 +193,8 @@ jobs: coverageArtifactsDir: $(Build.SourcesDirectory)/CoverageStaging coverageReportName: WindowsCoreCoverage pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2026preview.scout.amd64.open - ${{ if ne(variables['System.TeamProject'], 'public') }}: - name: VSEng-MicroBuildVSStable - demands: agent.os -equals Windows_NT + name: $(WindowsPoolName) + demands: $(WindowsPoolDemands) timeoutInMinutes: 120 steps: - template: azure-pipelines/check-documentation-only-change.yml @@ -291,12 +303,8 @@ jobs: coverageArtifactsDir: $(Build.SourcesDirectory)/CoverageStaging coverageReportName: WindowsFullReleaseCoverage pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2026preview.scout.amd64.open - ${{ if ne(variables['System.TeamProject'], 'public') }}: - name: VSEng-MicroBuildVSStable - demands: agent.os -equals Windows_NT + name: $(WindowsPoolName) + demands: $(WindowsPoolDemands) timeoutInMinutes: 120 steps: - template: azure-pipelines/check-documentation-only-change.yml @@ -377,11 +385,8 @@ jobs: - job: CoreBootstrappedOnLinux displayName: "Linux Core" pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open - ${{ if ne(variables['System.TeamProject'], 'public') }}: - vmImage: 'ubuntu-latest' + name: $(LinuxPoolName) + demands: $(LinuxPoolDemands) steps: - template: azure-pipelines/check-documentation-only-change.yml - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: @@ -567,12 +572,8 @@ jobs: variables: onlyDocChanged: $[ dependencies.BootstrapMSBuildOnFullFrameworkWindows.outputs['CheckDocumentationOnlyChange.onlyDocChanged'] ] pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2026preview.scout.amd64.open - ${{ if ne(variables['System.TeamProject'], 'public') }}: - name: VSEng-MicroBuildVSStable - demands: agent.os -equals Windows_NT + name: $(WindowsPoolName) + demands: $(WindowsPoolDemands) steps: # Task to collect code coverage on Windows. Disabled by default due to being unstable and sometimes it stucks forever # - task: DownloadPipelineArtifact@2 From ce28af0529e8e6199716caddfb716b773aca0218 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Wed, 4 Mar 2026 13:24:57 -0600 Subject: [PATCH 2/2] Use shared Linux pool config for multithreaded CI job Make BootstrapMSBuildWithMTMode use the same public/internal pool selection as CoreBootstrappedOnLinux to keep Linux job environments consistent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .vsts-dotnet-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index 235554c8c83..904a3ed81c3 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -270,7 +270,11 @@ jobs: - job: BootstrapMSBuildWithMTMode displayName: "Linux Core Multithreaded Mode" pool: - vmImage: 'ubuntu-latest' + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + vmImage: 'ubuntu-latest' timeoutInMinutes: 120 steps: - template: azure-pipelines/check-documentation-only-change.yml