@@ -48,18 +48,18 @@ variables:
4848 ${{ else }} :
4949 value : windows.vs2022preview.amd64
5050
51- - name : Vs2022QueueName
52- ${{ if eq(variables['System.TeamProject'], 'public') }} :
53- value : windows.vs2022.amd64.open
54- ${{ else }} :
55- value : windows.vs2022.amd64
56-
5751 - name : UbuntuQueueName
5852 ${{ if eq(variables['System.TeamProject'], 'public') }} :
5953 value : Build.Ubuntu.2004.Amd64.Open
6054 ${{ else }} :
6155 value : Build.Ubuntu.2004.Amd64
6256
57+ - name : WindowsQueueName
58+ ${{ if eq(variables['System.TeamProject'], 'public') }} :
59+ value : 1es-windows-2022-open
60+ ${{ else }} :
61+ value : 1es-windows-2022
62+
6363 - name : HelixWindowsQueueName
6464 ${{ if eq(variables['System.TeamProject'], 'public') }} :
6565 value : Windows.10.Amd64.Open
@@ -84,6 +84,25 @@ variables:
8484 ${{ else }} :
8585 value : OSX.13.Amd64
8686
87+ parameters :
88+ # These pools allow us to configure the pools once for multiple jobs.
89+ # We have to use parameters here as these are object typed.
90+ - name : ubuntuPool
91+ type : object
92+ default :
93+ name : $(PoolName)
94+ demands : ImageOverride -equals $(UbuntuQueueName)
95+ - name : windowsPool
96+ type : object
97+ default :
98+ name : $(PoolName)
99+ demands : ImageOverride -equals $(WindowsQueueName)
100+ - name : vs2022PreviewPool
101+ type : object
102+ default :
103+ name : $(PoolName)
104+ demands : ImageOverride -equals $(Vs2022PreviewQueueName)
105+
87106stages :
88107- stage : Windows_Debug_Build
89108 dependsOn : []
@@ -93,8 +112,7 @@ stages:
93112 jobName : Build_Windows_Debug
94113 testArtifactName : Transport_Artifacts_Windows_Debug
95114 configuration : Debug
96- poolName : $(PoolName)
97- queueName : $(Vs2022PreviewQueueName)
115+ poolParameters : ${{ parameters.vs2022PreviewPool }}
98116 restoreArguments : -msbuildEngine dotnet /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false
99117 buildArguments : -msbuildEngine dotnet /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false /p:PublishReadyToRun=false
100118
@@ -106,8 +124,7 @@ stages:
106124 jobName : Build_Windows_Release
107125 testArtifactName : Transport_Artifacts_Windows_Release
108126 configuration : Release
109- poolName : $(PoolName)
110- queueName : $(Vs2022PreviewQueueName)
127+ poolParameters : ${{ parameters.vs2022PreviewPool }}
111128 restoreArguments : -msbuildEngine dotnet /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false
112129 buildArguments : -msbuildEngine dotnet /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false /p:PublishReadyToRun=false
113130
@@ -118,9 +135,7 @@ stages:
118135 parameters :
119136 jobName : Build_Unix_Debug
120137 testArtifactName : Transport_Artifacts_Unix_Debug
121- configuration : Debug
122- poolName : $(PoolName)
123- queueName : $(UbuntuQueueName)
138+ poolParameters : ${{ parameters.ubuntuPool }}
124139
125140- stage : Source_Build
126141 dependsOn : []
@@ -162,6 +177,7 @@ stages:
162177 testArguments : -testDesktop -testArch x86
163178 helixQueueName : $(HelixWindowsQueueName)
164179 helixApiAccessToken : $(HelixApiAccessToken)
180+ poolParameters : ${{ parameters.windowsPool }}
165181
166182 - template : eng/pipelines/test-windows-job.yml
167183 parameters :
@@ -172,6 +188,7 @@ stages:
172188 testArguments : -testDesktop -testArch x64
173189 helixQueueName : $(HelixWindowsQueueName)
174190 helixApiAccessToken : $(HelixApiAccessToken)
191+ poolParameters : ${{ parameters.windowsPool }}
175192
176193- stage : Windows_Release_Desktop
177194 dependsOn : Windows_Release_Build
@@ -188,6 +205,7 @@ stages:
188205 testArguments : -testDesktop -testArch x86
189206 helixQueueName : $(HelixWindowsQueueName)
190207 helixApiAccessToken : $(HelixApiAccessToken)
208+ poolParameters : ${{ parameters.windowsPool }}
191209
192210 - ${{ if ne(variables['Build.Reason'], 'PullRequest') }} :
193211 - template : eng/pipelines/test-windows-job.yml
@@ -199,6 +217,7 @@ stages:
199217 testArguments : -testDesktop -testArch x64
200218 helixQueueName : $(HelixWindowsQueueName)
201219 helixApiAccessToken : $(HelixApiAccessToken)
220+ poolParameters : ${{ parameters.windowsPool }}
202221
203222 - template : eng/pipelines/test-windows-job.yml
204223 parameters :
@@ -209,6 +228,7 @@ stages:
209228 testArguments : -testDesktop -testArch x64
210229 helixQueueName : $(HelixWindowsSpanishQueueName)
211230 helixApiAccessToken : $(HelixApiAccessToken)
231+ poolParameters : ${{ parameters.windowsPool }}
212232
213233- stage : Windows_Debug_CoreClr
214234 dependsOn : Windows_Debug_Build
@@ -225,6 +245,7 @@ stages:
225245 testArguments : -testCoreClr
226246 helixQueueName : $(HelixWindowsQueueName)
227247 helixApiAccessToken : $(HelixApiAccessToken)
248+ poolParameters : ${{ parameters.windowsPool }}
228249
229250 - ${{ if ne(variables['Build.Reason'], 'PullRequest') }} :
230251 - template : eng/pipelines/test-windows-job-single-machine.yml
@@ -233,8 +254,7 @@ stages:
233254 jobName : Test_Windows_CoreClr_Debug_Single_Machine
234255 testArtifactName : Transport_Artifacts_Windows_Debug
235256 configuration : Debug
236- poolName : $(PoolName)
237- queueName : $(Vs2022QueueName)
257+ poolParameters : ${{ parameters.vs2022PreviewPool }}
238258 testArguments : -testCoreClr
239259
240260 - template : eng/pipelines/test-windows-job.yml
@@ -246,6 +266,7 @@ stages:
246266 testArguments : -testCoreClr -testIOperation -testCompilerOnly
247267 helixQueueName : $(HelixWindowsQueueName)
248268 helixApiAccessToken : $(HelixApiAccessToken)
269+ poolParameters : ${{ parameters.windowsPool }}
249270
250271 # This leg runs almost all the compiler tests supported on CoreCLR, but
251272 # with additional validation for used assemblies and GetEmitDiagnostics
@@ -258,6 +279,7 @@ stages:
258279 testArguments : -testCoreClr -testUsedAssemblies -testCompilerOnly
259280 helixQueueName : $(HelixWindowsQueueName)
260281 helixApiAccessToken : $(HelixApiAccessToken)
282+ poolParameters : ${{ parameters.windowsPool }}
261283
262284- stage : Windows_Release_CoreClr
263285 dependsOn : Windows_Release_Build
@@ -274,6 +296,7 @@ stages:
274296 testArguments : -testCoreClr
275297 helixQueueName : $(HelixWindowsQueueName)
276298 helixApiAccessToken : $(HelixApiAccessToken)
299+ poolParameters : ${{ parameters.windowsPool }}
277300
278301- stage : Unix_Debug_CoreClr
279302 dependsOn : Unix_Build
@@ -290,6 +313,7 @@ stages:
290313 testArguments : --testCoreClr
291314 helixQueueName : $(HelixUbuntuQueueName)
292315 helixApiAccessToken : $(HelixApiAccessToken)
316+ poolParameters : ${{ parameters.ubuntuPool }}
293317
294318 - ${{ if ne(variables['Build.Reason'], 'PullRequest') }} :
295319 - template : eng/pipelines/test-unix-job-single-machine.yml
@@ -299,8 +323,7 @@ stages:
299323 testArtifactName : Transport_Artifacts_Unix_Debug
300324 configuration : Debug
301325 testArguments : --testCoreClr
302- poolName : $(PoolName)
303- queueName : $(UbuntuQueueName)
326+ poolParameters : ${{ parameters.ubuntuPool }}
304327
305328 - ${{ if ne(variables['Build.Reason'], 'PullRequest') }} :
306329 - template : eng/pipelines/test-unix-job.yml
@@ -312,15 +335,15 @@ stages:
312335 testArguments : --testCoreClr
313336 helixQueueName : $(HelixMacOsQueueName)
314337 helixApiAccessToken : $(HelixApiAccessToken)
338+ poolParameters : ${{ parameters.ubuntuPool }}
315339
316340- stage : Correctness
317341 dependsOn : []
318342 jobs :
319343 - template : eng/pipelines/evaluate-changed-files.yml
320344 parameters :
321345 jobName : Determine_Changes
322- poolName : $(PoolName)
323- vmImageName : ubuntu-latest
346+ poolParameters : ${{ parameters.ubuntuPool }}
324347 paths :
325348 - subset : compilers
326349 include :
@@ -332,9 +355,7 @@ stages:
332355
333356 - job : Correctness_Build_Artifacts
334357 dependsOn : Determine_Changes
335- pool :
336- name : $(PoolName)
337- demands : ImageOverride -equals $(Vs2022PreviewQueueName)
358+ pool : ${{ parameters.vs2022PreviewPool }}
338359 timeoutInMinutes : 90
339360 variables :
340361 - template : eng/pipelines/variables-build.yml
@@ -382,9 +403,7 @@ stages:
382403 - job : Correctness_Determinism
383404 dependsOn : Determine_Changes
384405 condition : or(ne(variables['Build.Reason'], 'PullRequest'), eq(dependencies.Determine_Changes.outputs['SetPathVars_compilers.containsChange'], 'true'))
385- pool :
386- name : $(PoolName)
387- demands : ImageOverride -equals $(Vs2022PreviewQueueName)
406+ pool : ${{ parameters.vs2022PreviewPool }}
388407 timeoutInMinutes : 90
389408 variables :
390409 - template : eng/pipelines/variables-build.yml
@@ -404,9 +423,7 @@ stages:
404423 - job : Correctness_Bootstrap_Build_Default
405424 dependsOn : Determine_Changes
406425 condition : or(ne(variables['Build.Reason'], 'PullRequest'), eq(dependencies.Determine_Changes.outputs['SetPathVars_compilers.containsChange'], 'true'))
407- pool :
408- name : $(PoolName)
409- demands : ImageOverride -equals $(Vs2022PreviewQueueName)
426+ pool : ${{ parameters.vs2022PreviewPool }}
410427 timeoutInMinutes : 90
411428 variables :
412429 - template : eng/pipelines/variables-build.yml
@@ -420,9 +437,7 @@ stages:
420437 - job : Correctness_Bootstrap_Build_Framework
421438 dependsOn : Determine_Changes
422439 condition : ne(variables['Build.Reason'], 'Pull Request')
423- pool :
424- name : $(PoolName)
425- demands : ImageOverride -equals $(Vs2022PreviewQueueName)
440+ pool : ${{ parameters.vs2022PreviewPool }}
426441 timeoutInMinutes : 90
427442 variables :
428443 - template : eng/pipelines/variables-build.yml
@@ -434,8 +449,7 @@ stages:
434449 bootstrapToolset : Framework
435450
436451 - job : Correctness_TodoCheck
437- pool :
438- vmImage : ubuntu-20.04
452+ pool : ${{ parameters.ubuntuPool }}
439453 timeoutInMinutes : 10
440454 steps :
441455 - template : eng/pipelines/checkout-unix-task.yml
@@ -446,9 +460,7 @@ stages:
446460 - job : Correctness_Rebuild
447461 dependsOn : Determine_Changes
448462 condition : or(ne(variables['Build.Reason'], 'PullRequest'), eq(dependencies.Determine_Changes.outputs['SetPathVars_compilers.containsChange'], 'true'))
449- pool :
450- name : $(PoolName)
451- demands : ImageOverride -equals $(Vs2022PreviewQueueName)
463+ pool : ${{ parameters.vs2022PreviewPool }}
452464 timeoutInMinutes : 90
453465 variables :
454466 - template : eng/pipelines/variables-build.yml
@@ -475,9 +487,7 @@ stages:
475487 configuration : Release
476488
477489 - job : Correctness_Analyzers
478- pool :
479- name : $(PoolName)
480- demands : ImageOverride -equals $(UbuntuQueueName)
490+ pool : ${{ parameters.ubuntuPool }}
481491 timeoutInMinutes : 35
482492 variables :
483493 - template : eng/pipelines/variables-build.yml
0 commit comments