Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions eng/common/core-templates/variables/pool-images.yml
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 }}
81 changes: 81 additions & 0 deletions eng/common/templates-official/variables/pool-images.yml
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, '') }}:
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.

- 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
70 changes: 70 additions & 0 deletions eng/common/templates/variables/pool-images.yml
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
Loading