-
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
Draft
Copilot
wants to merge
5
commits into
main
Choose a base branch
from
copilot/add-yaml-variables-file
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+167
−0
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ff12425
Initial plan
Copilot a3fabec
Add pool-images.yml variables files for VMR alignment
Copilot 0d70f6b
Add core-templates wrapper for pool-images.yml
Copilot 3a5cee8
Import pool-providers.yml and make defaultPoolName overrideable
Copilot 96643a9
Change useDefaultPool to defaultPoolName parameter
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| parameters: | ||
| is1ESPipeline: false | ||
| isScoutingJob: false | ||
| defaultPoolName: '' | ||
|
|
||
| variables: | ||
| - ${{ if eq(parameters.is1ESPipeline, 'true') }}: | ||
| - template: /eng/common/templates-official/variables/pool-images.yml | ||
| parameters: | ||
| isScoutingJob: ${{ parameters.isScoutingJob }} | ||
| defaultPoolName: ${{ parameters.defaultPoolName }} | ||
| - ${{ else }}: | ||
| - template: /eng/common/templates/variables/pool-images.yml | ||
| parameters: | ||
| isScoutingJob: ${{ parameters.isScoutingJob }} | ||
| defaultPoolName: ${{ parameters.defaultPoolName }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Pool image definitions aligned with VMR builds to avoid skew between official VMR builds | ||
| # and repository testing. These variables define the specific images (Docker, Linux, Windows, Mac) | ||
| # used for both public and internal builds. | ||
| # | ||
| # Motivation: | ||
| # The VMR introduces possible skew between what is built officially and what repos test against. | ||
| # The VMR builds using specific pool images, and repos like runtime and SDK may build using different | ||
| # images. While these builds aren't used officially, they have required testing. We need to ensure | ||
| # that the specific versions used for building don't introduce problems. | ||
| # | ||
| # How to use: | ||
| # Import this template in your Azure Pipeline to pick up the pool image variables, e.g.: | ||
| # | ||
| # variables: | ||
| # - template: /eng/common/templates-official/variables/pool-images.yml@self | ||
| # parameters: | ||
| # isScoutingJob: false # Optional: set to true to use scouting Windows images | ||
| # defaultPoolName: '' # Optional: specify pool name, empty uses pool-providers default | ||
| # | ||
| # Then use the variables in your pool definitions: | ||
| # | ||
| # pool: | ||
| # name: $(defaultPoolName) | ||
| # image: $(poolImage_Linux) | ||
| # | ||
| # Or for Windows: | ||
| # | ||
| # pool: | ||
| # name: $(defaultPoolName) | ||
| # image: $(poolImage_Windows) | ||
|
|
||
| parameters: | ||
| - name: isScoutingJob | ||
| type: boolean | ||
| default: false | ||
| - name: defaultPoolName | ||
| type: string | ||
| default: '' | ||
|
|
||
| variables: | ||
| # Import pool-providers to get the default pool based on branch | ||
| - template: /eng/common/templates-official/variables/pool-providers.yml | ||
|
|
||
| - ${{ if eq(variables['System.TeamProject'], 'public') }}: | ||
| # Override defaultPoolName if specified via parameter | ||
| - ${{ if ne(parameters.defaultPoolName, '') }}: | ||
| - name: defaultPoolName | ||
| value: ${{ parameters.defaultPoolName }} | ||
| - name: shortStackPoolName | ||
| value: NetCore-Public | ||
| - name: poolImage_Linux | ||
| value: build.ubuntu.2204.amd64.open | ||
| - name: poolImage_LinuxArm64 | ||
| value: Mariner-2-Docker-ARM64 | ||
| - name: poolName_LinuxArm64 | ||
| value: Docker-Linux-Arm-Public | ||
| - name: poolImage_Mac | ||
| value: macos-14 | ||
| - ${{ if eq(parameters.isScoutingJob, true) }}: | ||
| - name: poolImage_Windows | ||
| value: windows.vs2022.scout.amd64.open | ||
| - ${{ else }}: | ||
| - name: poolImage_Windows | ||
| value: windows.vs2022.amd64.open | ||
| - ${{ else }}: | ||
| # Override defaultPoolName if specified via parameter | ||
| - ${{ if ne(parameters.defaultPoolName, '') }}: | ||
| - name: defaultPoolName | ||
| value: ${{ parameters.defaultPoolName }} | ||
| - name: shortStackPoolName | ||
| value: NetCore1ESPool-Internal | ||
| - name: poolImage_Linux | ||
| value: build.ubuntu.2204.amd64 | ||
| - name: poolImage_LinuxArm64 | ||
| value: Azure-Linux-3-Arm64 | ||
| - name: poolName_LinuxArm64 | ||
| value: Docker-Linux-Arm-Internal | ||
| - name: poolImage_Mac | ||
| value: macos-latest-internal | ||
| - name: poolImage_Windows | ||
| value: windows.vs2022.amd64 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Pool image definitions aligned with VMR builds to avoid skew between official VMR builds | ||
| # and repository testing. These variables define the specific images (Docker, Linux, Windows, Mac) | ||
| # used for both public and internal builds. | ||
| # | ||
| # Motivation: | ||
| # The VMR introduces possible skew between what is built officially and what repos test against. | ||
| # The VMR builds using specific pool images, and repos like runtime and SDK may build using different | ||
| # images. While these builds aren't used officially, they have required testing. We need to ensure | ||
| # that the specific versions used for building don't introduce problems. | ||
| # | ||
| # How to use: | ||
| # Import this template in your Azure Pipeline to pick up the pool image variables, e.g.: | ||
| # | ||
| # variables: | ||
| # - template: /eng/common/templates/variables/pool-images.yml@self | ||
| # parameters: | ||
| # isScoutingJob: false # Optional: set to true to use scouting Windows images | ||
| # defaultPoolName: '' # Optional: specify pool name, empty uses pool-providers default | ||
| # | ||
| # Then use the variables in your pool definitions: | ||
| # | ||
| # pool: | ||
| # name: $(defaultPoolName) | ||
| # image: $(poolImage_Linux) | ||
| # | ||
| # Or for Windows: | ||
| # | ||
| # pool: | ||
| # name: $(defaultPoolName) | ||
| # image: $(poolImage_Windows) | ||
|
|
||
| parameters: | ||
| - name: isScoutingJob | ||
| type: boolean | ||
| default: false | ||
| - name: defaultPoolName | ||
| type: string | ||
| default: '' | ||
|
|
||
| variables: | ||
| - ${{ if eq(variables['System.TeamProject'], 'internal') }}: | ||
| - template: /eng/common/templates-official/variables/pool-images.yml@self | ||
| parameters: | ||
| isScoutingJob: ${{ parameters.isScoutingJob }} | ||
| defaultPoolName: ${{ parameters.defaultPoolName }} | ||
| - ${{ else }}: | ||
| # Import pool-providers to get the default pool based on branch | ||
| - template: /eng/common/templates/variables/pool-providers.yml@self | ||
|
|
||
| # Public build pool images | ||
| # Override defaultPoolName if specified via parameter | ||
| - ${{ if ne(parameters.defaultPoolName, '') }}: | ||
| - name: defaultPoolName | ||
| value: ${{ parameters.defaultPoolName }} | ||
| - name: shortStackPoolName | ||
| value: NetCore-Public | ||
| - name: poolImage_Linux | ||
| value: build.ubuntu.2204.amd64.open | ||
| - name: poolImage_LinuxArm64 | ||
| value: Mariner-2-Docker-ARM64 | ||
| - name: poolName_LinuxArm64 | ||
| value: Docker-Linux-Arm-Public | ||
| - name: poolImage_Mac | ||
| value: macos-14 | ||
| - ${{ if eq(parameters.isScoutingJob, true) }}: | ||
| - name: poolImage_Windows | ||
| value: windows.vs2022.scout.amd64.open | ||
| - ${{ else }}: | ||
| - name: poolImage_Windows | ||
| value: windows.vs2022.amd64.open |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.