Skip to content
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

Rearrange pool choice yml for build pipelines #286

Merged
merged 1 commit into from
Apr 2, 2024
Merged
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
50 changes: 29 additions & 21 deletions eng/pipeline/stages/build-test-publish-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,71 @@ parameters:
extraParameters: {}

stages:
- template: ../../common/templates/stages/build-test-publish-repo.yml
- template: /eng/common/templates/stages/build-test-publish-repo.yml@self
parameters:
buildMatrixCustomBuildLegGroupArgs: --custom-build-leg-group build
noCache: true
# Template paths must be relative to the YAML job that executes them
customBuildInitSteps:
- template: ../../../pipeline/steps/set-imagebuilder-build-args-var.yml
- template: ../../../pipeline/steps/set-public-source-branch-var.yml
- template: /eng/pipeline/steps/set-imagebuilder-build-args-var.yml@self
- template: /eng/pipeline/steps/set-public-source-branch-var.yml@self
customPublishInitSteps:
- template: ../../../pipeline/steps/set-public-source-branch-var.yml
# Specific pools for arm builds.
- template: /eng/pipeline/steps/set-public-source-branch-var.yml@self

# Linux AMD64
linuxAmd64Pool:
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.publicProjectName) }}:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.2204.amd64.open
${{ elseif eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
name: NetCore1ESPool-Internal
image: 1es-ubuntu-2204
os: linux

# Linux ARM64
linuxArm64Pool:
os: linux
hostArchitecture: Arm64
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.publicProjectName) }}:
name: Docker-Linux-Arm-Public
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
image: Mariner-2-Docker-ARM64
${{ elseif eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
name: Docker-Linux-Arm-Internal
image: Mariner-2-Docker-ARM64

# Linux ARM32
linuxArm32Pool:
os: linux
hostArchitecture: Arm64
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.publicProjectName) }}:
name: Docker-Linux-Arm-Public
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
${{ elseif eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
name: Docker-Linux-Arm-Internal
image: Mariner-2-Docker-ARM64
# On Windows, 'docker login' is incompatible with 'manifest-tool' unless we use these pools.
# https://github.com/dotnet/docker-tools/issues/905

# Windows 2016
windows2016Pool:
os: windows
name: Docker-2016-${{ variables['System.TeamProject'] }}
${{ if eq(variables['System.TeamProject'], parameters.internalProjectName) }}:
image: Server2016-NESDockerBuilds-PT

# Windows 2019 (1809)
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.publicProjectName) }}:
windows1809Pool: Docker-1809-${{ variables['System.TeamProject'] }}
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
${{ elseif eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
windows1809Pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2019
os: windows

# Windows 2022
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.publicProjectName) }}:
windows2022Pool: Docker-2022-${{ variables['System.TeamProject'] }}
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
${{ elseif eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
windows2022Pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
# Use 1ES pools to avoid contention in AzDO hosted pools.
linuxAmd64Pool:
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.publicProjectName) }}:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.2204.amd64.open
${{ if eq(variables['System.TeamProject'], parameters.extraParameters.internalProjectName) }}:
name: NetCore1ESPool-Internal
image: 1es-ubuntu-2204
os: linux

${{ each pair in parameters.extraParameters }}:
${{ pair.key }}: ${{ pair.value }}