Skip to content

Stop using Microsoft/GitHub's ubuntu-* images as the linux-x64 build image for .NET pipelines #1728

@lbussell

Description

@lbussell

Today, we use the following default images for linux-amd64 builds:

  • Public: ubuntu-latest
  • Internal: 1es-ubuntu-2204

Downsides of using these images:

  • We (.NET) do not control the contents of these images. And they contain a lot of stuff.
  • Using them causes slower builds in two ways
    • Cleaning off the pre-loaded docker images takes extra time
    • Public PR validation using the default pool ("Azure Pipelines") and the Microsoft-hosted images is limited to 200 concurrent jobs across the entire dotnet org. Oftentimes we have to wait for agents during PR validation. We have much more capacity in other pools like NetCore-Public. Available pools can be found at https://dev.azure.com/dnceng-public/public/_settings/agentqueues

To me it looks like we should use the following images, until Azure Linux 3 images are available from dnceng:

  • Public: build.ubuntu.2204.amd64.open
  • Internal: build.ubuntu.2204.amd64

See the following code:

- name: linuxAmd64InternalPoolImage
value: 1es-ubuntu-2204

- name: defaultLinuxAmd64PoolImage
value: ubuntu-latest

pool:
${{ if ne(parameters.pool, '') }}:
${{ parameters.pool }}
${{ elseif eq(variables['System.TeamProject'], parameters.publicProjectName) }}:
vmImage: $(defaultLinuxAmd64PoolImage)
${{ elseif eq(variables['System.TeamProject'], parameters.internalProjectName) }}:
name: $(linuxAmd64InternalPoolName)
image: $(linuxAmd64InternalPoolImage)
os: linux

# 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: $(linuxAmd64InternalPoolName)
image: $(linuxAmd64InternalPoolImage)
os: linux

Metadata

Metadata

Assignees

Type

Projects

Status

Tracking

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions