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 withmcr.microsoft.com/onebranch/azurelinux/build:3.0to 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
IsMarinerenvironment flag inbuild.psm1to include bothmarinerandazurelinuxLinux IDs, ensuring Azure Linux is correctly detected as part of the Mariner family. (build.psm1 build.psm1L196-R196)
Package manager selection:
- Modified the
Get-RedHatPackageManagerfunction inbuild.psm1to usetdnffor Mariner/Azure Linux environments, improving compatibility with the new container image. (build.psm1 build.psm1R2210-R2211)
PR Context
PR Checklist
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Make sure all
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header - This PR is ready to merge. If this PR is a work in progress, please open this as a Draft Pull Request and mark it as Ready to Review when it is ready to merge.
- Breaking changes
- None
- OR
- Experimental feature(s) needed
- Experimental feature name(s):
- User-facing changes
- Not Applicable
- OR
- Documentation needed
- Issue filed:
- Testing - New and feature
- N/A or can only be tested interactively
- OR
- Make sure you've added a new test if existing tests do not effectively test the code changed