Add VMR-aligned pool image variables with flexible pool selection to eng/common
VMR builds use specific pool images that may differ from individual repo builds. This skew risks validation gaps—repos test on different images than what ships officially.
Changes
Created three YAML variable templates in eng/common defining VMR-aligned pool images with flexible pool selection:
-
templates-official/variables/pool-images.yml- Pool images for official/internal builds -
templates/variables/pool-images.yml- Public builds with conditional official template inclusion -
core-templates/variables/pool-images.yml- 1ES pipeline wrapper
Variables Provided
-
defaultPoolName,shortStackPoolName- Pool names (configurable viadefaultPoolNameparameter) -
poolImage_Linux,poolImage_Mac,poolImage_Windows- OS-specific images -
poolImage_LinuxArm64,poolName_LinuxArm64- ARM64 support - Optional
isScoutingJobparameter for Windows scouting images - Optional
defaultPoolNameparameter to specify pool name directly
Pool Selection
The templates import pool-providers.yml and provide flexible pool selection via the defaultPoolName parameter:
-
defaultPoolName: ''(empty/default): Uses pool-providers default pool (branch-aware)- Public:
NetCore-PublicorNetCore-Svc-Public(based on branch) - Internal:
NetCore1ESPool-InternalorNetCore1ESPool-Svc-Internal(based on branch)
- Public:
-
defaultPoolName: 'NetCore-Public-XL'(or any pool name): Overrides with the specified pool name- VMR builds can use XL pools by specifying the pool name explicitly
Usage
Using pool-providers default (branch-aware):
variables:
- template: /eng/common/templates/variables/pool-images.yml@self
# defaultPoolName not specified, uses pool-providers default
jobs:
- job: Build
pool:
name: $(defaultPoolName) # From pool-providers (NetCore-Public or NetCore-Svc-Public)
image: $(poolImage_Linux)
VMR builds with explicit pool specification:
variables:
- template: /eng/common/templates/variables/pool-images.yml@self
parameters:
defaultPoolName: 'NetCore-Public-XL' # For public VMR builds
# or 'NetCore1ESPool-Internal' for internal VMR builds
jobs:
- job: Build
pool:
name: $(defaultPoolName) # NetCore-Public-XL or NetCore1ESPool-Internal
image: $(poolImage_Linux)
Repos can opt-in to use these standardized images to align testing with VMR builds, with the flexibility to either use pool-providers defaults or specify exact pool names.
To double check:
- [x] The right tests are in and the right validation has happened. Guidance: https://github.com/dotnet/arcade/blob/main/Documentation/Validation.md
Original prompt
This section details on the original issue you should resolve
<issue_title>Introduce yaml variables file for shared tooling into eng/common</issue_title> <issue_description>The VMR introduces possible skew between what is built officially and what the repos test against. The VMR builds using https://github.com/dotnet/dotnet/blob/release/10.0.1xx/eng/pipelines/templates/variables/vmr-build.yml#L260-L293. However, repos like runtime and SDK may build using different images. These builds aren't used, but they have required testing. We need to know that the specific version macos used for building doesn't introduce problems. Runtime and VMR skew can jeopardize that validation.
Proposal is to put something in eng/common which can represent the latest set of images (docker, linux, windows, and mac) for public and internal builds. Repos that want to opt in to align with the VMR would use this file.</issue_description>
Comments on the Issue (you are @copilot in this section)
@mmitche /cc @agocke
- Fixes dotnet/arcade#16403
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
@copilot Please update this so that the variable file imports https://github.com/dotnet/arcade/blob/main/eng/common/templates-official/variables/pool-providers.yml. It should use this for the default pool.
I would also like the default pool to be overrideable by parameter in the new YAML. This is so that some repos can use the default pool decided by pool-providers, while VMR builds use the XL pools. Only
@copilot Please update this so that the variable file imports https://github.com/dotnet/arcade/blob/main/eng/common/templates-official/variables/pool-providers.yml. It should use this for the default ...
Done in commit 3a5cee8. The pool-images.yml templates now:
- Import pool-providers.yml to get the default pool based on branch
- Add
useDefaultPoolparameter (defaults tofalse):- When
false: Uses XL pools (NetCore-Public-XL / NetCore1ESPool-Internal) for VMR alignment - When
true: Uses the pool-providers default pool (branch-aware: NetCore-Public/-Svc-Public or NetCore1ESPool-Internal/-Svc-Internal)
- When
This allows VMR builds to use the XL pools by default, while other repos can opt-in to use the branch-based pool selection from pool-providers by setting useDefaultPool: true.