mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Update container images to use mcr.microsoft.com for Linux and Azure … (#25981)
This commit is contained in:
@@ -69,7 +69,7 @@ variables:
|
||||
- name: __DOTNET_RUNTIME_FEED
|
||||
value: ${{ parameters.InternalSDKBlobURL }}
|
||||
- name: LinuxContainerImage
|
||||
value: onebranch.azurecr.io/linux/ubuntu-2004:latest
|
||||
value: mcr.microsoft.com/onebranch/azurelinux/build:3.0
|
||||
- name: WindowsContainerImage
|
||||
value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
|
||||
- name: CDP_DEFINITION_BUILD_COUNT
|
||||
@@ -99,7 +99,8 @@ variables:
|
||||
# Disable BinSkim at job level to override NonOfficial template defaults
|
||||
- name: ob_sdl_binskim_enabled
|
||||
value: false
|
||||
|
||||
- name: ps_official_build
|
||||
value: ${{ parameters.OfficialBuild }}
|
||||
|
||||
extends:
|
||||
template: ${{ variables.templateFile }}
|
||||
@@ -143,7 +144,7 @@ extends:
|
||||
- job: SetVars
|
||||
displayName: Set Variables
|
||||
pool:
|
||||
type: windows
|
||||
type: linux
|
||||
|
||||
variables:
|
||||
- name: ob_outputDirectory
|
||||
|
||||
@@ -56,7 +56,7 @@ variables:
|
||||
- name: WindowsContainerImage
|
||||
value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' # Docker image which is used to build the project
|
||||
- name: LinuxContainerImage
|
||||
value: mcr.microsoft.com/onebranch/cbl-mariner/build:2.0
|
||||
value: mcr.microsoft.com/onebranch/azurelinux/build:3.0
|
||||
- group: mscodehub-feed-read-general
|
||||
- group: mscodehub-feed-read-akv
|
||||
- name: branchCounterKey
|
||||
@@ -66,7 +66,6 @@ variables:
|
||||
- group: MSIXSigningProfile
|
||||
- name: templateFile
|
||||
value: ${{ iif ( parameters.OfficialBuild, 'v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@onebranchTemplates' ) }}
|
||||
|
||||
|
||||
resources:
|
||||
pipelines:
|
||||
|
||||
@@ -47,11 +47,10 @@ variables:
|
||||
- name: WindowsContainerImage
|
||||
value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
|
||||
- name: LinuxContainerImage
|
||||
value: mcr.microsoft.com/onebranch/cbl-mariner/build:2.0
|
||||
value: mcr.microsoft.com/onebranch/azurelinux/build:3.0
|
||||
- group: PoolNames
|
||||
- name: templateFile
|
||||
value: ${{ iif ( parameters.OfficialBuild, 'v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@onebranchTemplates' ) }}
|
||||
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
|
||||
@@ -57,7 +57,7 @@ variables:
|
||||
- name: WindowsContainerImage
|
||||
value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
|
||||
- name: LinuxContainerImage
|
||||
value: mcr.microsoft.com/onebranch/cbl-mariner/build:2.0
|
||||
value: mcr.microsoft.com/onebranch/azurelinux/build:3.0
|
||||
- name: ReleaseTagVar
|
||||
value: ${{ parameters.ReleaseTagVar }}
|
||||
- group: PoolNames
|
||||
@@ -284,7 +284,7 @@ extends:
|
||||
|
||||
- stage: PublishGitHubReleaseAndNuget
|
||||
displayName: Publish GitHub and Nuget Release
|
||||
dependsOn:
|
||||
dependsOn:
|
||||
- setReleaseTagAndChangelog
|
||||
- UpdateChangeLog
|
||||
variables:
|
||||
@@ -404,7 +404,7 @@ extends:
|
||||
|
||||
- stage: ChangesToMaster
|
||||
displayName: Ensure changes are in GH master
|
||||
dependsOn:
|
||||
dependsOn:
|
||||
- PublishPMC
|
||||
jobs:
|
||||
- template: /.pipelines/templates/approvalJob.yml@self
|
||||
|
||||
@@ -26,7 +26,7 @@ variables:
|
||||
- group: 'ComponentGovernance'
|
||||
- group: 'PoolNames'
|
||||
- name: LinuxContainerImage
|
||||
value: onebranch.azurecr.io/linux/ubuntu-2004:latest
|
||||
value: mcr.microsoft.com/onebranch/azurelinux/build:3.0
|
||||
- name: WindowsContainerImage
|
||||
value: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
|
||||
- ${{ if eq(parameters['FORCE_CODEQL'],'true') }}:
|
||||
|
||||
@@ -201,5 +201,6 @@ jobs:
|
||||
- template: /.pipelines/templates/obp-file-signing.yml@self
|
||||
parameters:
|
||||
binPath: $(DropRootPath)
|
||||
OfficialBuild: $(ps_official_build)
|
||||
|
||||
- template: /.pipelines/templates/step/finalize.yml@self
|
||||
|
||||
@@ -148,5 +148,6 @@ jobs:
|
||||
- template: /.pipelines/templates/obp-file-signing.yml@self
|
||||
parameters:
|
||||
binPath: $(DropRootPath)
|
||||
OfficialBuild: $(ps_official_build)
|
||||
|
||||
- template: /.pipelines/templates/step/finalize.yml@self
|
||||
|
||||
@@ -206,6 +206,7 @@ jobs:
|
||||
- template: /.pipelines/templates/obp-file-signing.yml@self
|
||||
parameters:
|
||||
binPath: '$(Pipeline.Workspace)/Symbols_$(Architecture)'
|
||||
OfficialBuild: $(ps_official_build)
|
||||
|
||||
## first we sign all the files in the bin folder
|
||||
- ${{ if eq(variables['Architecture'], 'fxdependent') }}:
|
||||
@@ -213,6 +214,7 @@ jobs:
|
||||
parameters:
|
||||
binPath: '$(GlobalToolArtifactPath)/publish/PowerShell.Windows.x64/release'
|
||||
globalTool: 'true'
|
||||
OfficialBuild: $(ps_official_build)
|
||||
|
||||
- pwsh: |
|
||||
Get-ChildItem '$(GlobalToolArtifactPath)/obj/PowerShell.Windows.x64/release'
|
||||
|
||||
+7
-5
@@ -193,7 +193,7 @@ function Get-EnvironmentInformation
|
||||
$environment += @{'IsRedHatFamily' = $environment.IsCentOS -or $environment.IsFedora -or $environment.IsRedHat}
|
||||
$environment += @{'IsSUSEFamily' = $environment.IsSLES -or $environment.IsOpenSUSE}
|
||||
$environment += @{'IsAlpine' = $LinuxInfo.ID -match 'alpine'}
|
||||
$environment += @{'IsMariner' = $LinuxInfo.ID -match 'mariner'}
|
||||
$environment += @{'IsMariner' = $LinuxInfo.ID -match 'mariner' -or $LinuxInfo.ID -match 'azurelinux'}
|
||||
|
||||
# Workaround for temporary LD_LIBRARY_PATH hack for Fedora 24
|
||||
# https://github.com/PowerShell/PowerShell/issues/2511
|
||||
@@ -353,8 +353,8 @@ function Start-PSBuild {
|
||||
$PSModuleRestore = $true
|
||||
}
|
||||
|
||||
if ($Runtime -eq "linux-arm" -and $environment.IsLinux -and -not $environment.IsUbuntu) {
|
||||
throw "Cross compiling for linux-arm is only supported on Ubuntu environment"
|
||||
if ($Runtime -eq "linux-arm" -and $environment.IsLinux -and -not $environment.IsUbuntu -and -not $environment.IsMariner) {
|
||||
throw "Cross compiling for linux-arm is only supported on AzureLinux/Ubuntu environment"
|
||||
}
|
||||
|
||||
if ("win-arm","win-arm64" -contains $Runtime -and -not $environment.IsWindows) {
|
||||
@@ -2207,6 +2207,8 @@ function Get-RedHatPackageManager {
|
||||
"yum install -y -q"
|
||||
} elseif ($environment.IsFedora -or (Get-Command -Name dnf -CommandType Application -ErrorAction SilentlyContinue)) {
|
||||
"dnf install -y -q"
|
||||
} elseif ($environment.IsMariner -or (Get-Command -Name Test-DscConfiguration -CommandType Application -ErrorAction SilentlyContinue)) {
|
||||
"tdnf install -y -q"
|
||||
} else {
|
||||
throw "Error determining package manager for this distribution."
|
||||
}
|
||||
@@ -2278,8 +2280,8 @@ function Start-PSBootstrap {
|
||||
# Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly
|
||||
$sudo = if (!$NoSudo) { "sudo" }
|
||||
|
||||
if ($BuildLinuxArm -and $environment.IsLinux -and -not $environment.IsUbuntu) {
|
||||
Write-Error "Cross compiling for linux-arm is only supported on Ubuntu environment"
|
||||
if ($BuildLinuxArm -and $environment.IsLinux -and -not $environment.IsUbuntu -and -not $environment.IsMariner) {
|
||||
Write-Error "Cross compiling for linux-arm is only supported on AzureLinux/Ubuntu environment"
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user