Update container images to use mcr.microsoft.com for Linux and Azure … by TravisEz13 · Pull Request #25981 · PowerShell/PowerShell

…Linux

PR Summary

This pull request updates the build pipeline configuration and detection logic to support Azure Linux (azurelinux) as the primary Linux container image, replacing previous usage of Ubuntu and CBL-Mariner. It also enhances the environment detection in build.psm1 to recognize Azure Linux as a Mariner family distribution and updates package manager selection accordingly.

Pipeline configuration updates:

  • Replaced all references to the previous Linux container images (ubuntu-2004, cbl-mariner/build:2.0) in pipeline YAML files with mcr.microsoft.com/onebranch/azurelinux/build:3.0 to standardize on Azure Linux for builds. (.pipelines/PowerShell-Coordinated_Packages-Official.yml [1] .pipelines/PowerShell-Packages-Official.yml [2] .pipelines/PowerShell-Release-Official-Azure.yml [3] .pipelines/PowerShell-Release-Official.yml [4] .pipelines/apiscan-gen-notice.yml [5]

Environment detection improvements:

  • Updated the IsMariner environment flag in build.psm1 to include both mariner and azurelinux Linux IDs, ensuring Azure Linux is correctly detected as part of the Mariner family. (build.psm1 build.psm1L196-R196)

Package manager selection:

  • Modified the Get-RedHatPackageManager function in build.psm1 to use tdnf for Mariner/Azure Linux environments, improving compatibility with the new container image. (build.psm1 build.psm1R2210-R2211)

PR Context

PR Checklist