Skip to content

Factor out default build agent pools and image names into shared variables #1227

@lbussell

Description

@lbussell

Related: https://github.com/dotnet/dotnet-docker-internal/issues/4475

With the addition of 1ES pipeline templates, we have a few places where our default pool definitions are overridden or ignored. We should consolidate these into one set of variables for our pools and image names so we don't have any hardcoded values anywhere.

# Linux AMD64
linuxAmd64Pool:
${{ if ne(parameters.linuxAmd64Pool, '') }}:
${{ parameters.linuxAmd64Pool }}
${{ elseif eq(variables['System.TeamProject'], parameters.publicProjectName) }}:
vmImage: $(defaultLinuxAmd64PoolImage)
${{ elseif eq(variables['System.TeamProject'], parameters.internalProjectName) }}:
name: NetCore1ESPool-Internal
image: 1es-ubuntu-2204
os: linux

- name: defaultLinuxAmd64PoolImage
value: ubuntu-latest
- name: defaultLinuxArm32PoolImage
value: null
- name: defaultLinuxArm64PoolImage
value: null
- name: defaultWindows2016PoolImage
value: vs2017-win2016
- name: defaultWindows1809PoolImage
value: windows-2019
- name: defaultWindows2022PoolImage
value: windows-2022

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows

https://github.com/lbussell/dotnet-docker/blob/9482b39dbd103f56ce42b62cbb14bda00f223c40/eng/pipelines/cg-images.yml#L25-L36

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions