-
Notifications
You must be signed in to change notification settings - Fork 378
Add VMR-aligned pool image variables with flexible pool selection to eng/common #16404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
|
@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>
Done in commit 3a5cee8. The pool-images.yml templates now:
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 |
| parameters: | ||
| is1ESPipeline: false | ||
| isScoutingJob: false | ||
| useDefaultPool: false |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
defaultPoolNameis empty (default): Uses the pool value from pool-providers (branch-aware) - When
defaultPoolNameis 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>
|
|
||
| - ${{ if eq(variables['System.TeamProject'], 'public') }}: | ||
| # Override defaultPoolName if specified via parameter | ||
| - ${{ if ne(parameters.defaultPoolName, '') }}: |
There was a problem hiding this comment.
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.
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/commondefining VMR-aligned pool images with flexible pool selection:templates-official/variables/pool-images.yml- Pool images for official/internal buildstemplates/variables/pool-images.yml- Public builds with conditional official template inclusioncore-templates/variables/pool-images.yml- 1ES pipeline wrapperVariables Provided
defaultPoolName,shortStackPoolName- Pool names (configurable viadefaultPoolNameparameter)poolImage_Linux,poolImage_Mac,poolImage_Windows- OS-specific imagespoolImage_LinuxArm64,poolName_LinuxArm64- ARM64 supportisScoutingJobparameter for Windows scouting imagesdefaultPoolNameparameter to specify pool name directlyPool Selection
The templates import
pool-providers.ymland provide flexible pool selection via thedefaultPoolNameparameter:defaultPoolName: ''(empty/default): Uses pool-providers default pool (branch-aware)NetCore-PublicorNetCore-Svc-Public(based on branch)NetCore1ESPool-InternalorNetCore1ESPool-Svc-Internal(based on branch)defaultPoolName: 'NetCore-Public-XL'(or any pool name): Overrides with the specified pool nameUsage
Using pool-providers default (branch-aware):
VMR builds with explicit pool specification:
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
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.