diff --git a/eng/common/core-templates/variables/pool-images.yml b/eng/common/core-templates/variables/pool-images.yml new file mode 100644 index 00000000000..d48fac39b3a --- /dev/null +++ b/eng/common/core-templates/variables/pool-images.yml @@ -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 }} diff --git a/eng/common/templates-official/variables/pool-images.yml b/eng/common/templates-official/variables/pool-images.yml new file mode 100644 index 00000000000..66836364079 --- /dev/null +++ b/eng/common/templates-official/variables/pool-images.yml @@ -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 diff --git a/eng/common/templates/variables/pool-images.yml b/eng/common/templates/variables/pool-images.yml new file mode 100644 index 00000000000..5f1cc90845e --- /dev/null +++ b/eng/common/templates/variables/pool-images.yml @@ -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