Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

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 via defaultPoolName parameter)
  • poolImage_Linux, poolImage_Mac, poolImage_Windows - OS-specific images
  • poolImage_LinuxArm64, poolName_LinuxArm64 - ARM64 support
  • Optional isScoutingJob parameter for Windows scouting images
  • Optional defaultPoolName parameter 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-Public or NetCore-Svc-Public (based on branch)
    • Internal: NetCore1ESPool-Internal or NetCore1ESPool-Svc-Internal (based on branch)
  • 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:

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

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 11, 2025 19:08
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Copilot AI changed the title [WIP] Introduce yaml variables file for shared tooling Add VMR-aligned pool image variables to eng/common Dec 11, 2025
Copilot AI requested a review from mmitche December 11, 2025 19:15
@mmitche
Copy link
Member

mmitche commented Dec 11, 2025

@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

- Import pool-providers.yml to get default pool based on branch
- Add useDefaultPool parameter (default: false)
- When useDefaultPool=false: use XL pools (VMR alignment)
- When useDefaultPool=true: use pool-providers default (branch-based)
- Allows repos to choose between VMR-aligned XL pools or branch-based pools

Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 11, 2025

@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:

  1. Import pool-providers.yml to get the default pool based on branch
  2. Add useDefaultPool parameter (defaults to false):
    • 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)

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.

Copilot AI changed the title Add VMR-aligned pool image variables to eng/common Add VMR-aligned pool image variables with flexible pool selection to eng/common Dec 11, 2025
parameters:
is1ESPipeline: false
isScoutingJob: false
useDefaultPool: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Rather than useDefaultPool, instead use this to specify the defaultPool value. If empty, then the variable set in pool-providers would be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in commit 96643a9. Changed from boolean useDefaultPool to string defaultPoolName parameter:

  • When defaultPoolName is empty (default): Uses the pool value from pool-providers (branch-aware)
  • When defaultPoolName is specified: Overrides defaultPoolName with the provided value

Example usage:

# Use pool-providers default
- template: /eng/common/templates/variables/pool-images.yml@self

# Override with specific pool
- template: /eng/common/templates/variables/pool-images.yml@self
  parameters:
    defaultPoolName: 'NetCore-Public-XL'

- Replace boolean useDefaultPool with string defaultPoolName parameter
- When defaultPoolName is empty: uses pool-providers default (branch-aware)
- When defaultPoolName is specified: overrides with the provided pool name
- Provides more flexibility for repos to specify exact pool names
- VMR can set defaultPoolName to 'NetCore-Public-XL' or 'NetCore1ESPool-Internal'

Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Copilot AI requested a review from mmitche December 11, 2025 21:18

- ${{ if eq(variables['System.TeamProject'], 'public') }}:
# Override defaultPoolName if specified via parameter
- ${{ if ne(parameters.defaultPoolName, '') }}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the default pool name is not set, then it should be set based on the pool provider yaml variable (DncEngInternalBuildPool for the internal project, DncEngInternalBuildPool if public.

Also, please name the variable different from the parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce yaml variables file for shared tooling into eng/common

2 participants