Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions .pipelines/PowerShell-Coordinated_Packages-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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
Expand All @@ -86,6 +86,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 }}
Expand Down Expand Up @@ -130,7 +132,7 @@ extends:
- job: SetVars
displayName: Set Variables
pool:
type: windows
type: linux

variables:
- name: ob_outputDirectory
Expand Down
3 changes: 1 addition & 2 deletions .pipelines/PowerShell-Packages-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .pipelines/PowerShell-Release-Official-Azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .pipelines/PowerShell-Release-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -284,7 +284,7 @@ extends:

- stage: PublishGitHubReleaseAndNuget
displayName: Publish GitHub and Nuget Release
dependsOn:
dependsOn:
- setReleaseTagAndChangelog
- UpdateChangeLog
variables:
Expand Down Expand Up @@ -404,7 +404,7 @@ extends:

- stage: ChangesToMaster
displayName: Ensure changes are in GH master
dependsOn:
dependsOn:
- PublishPMC
jobs:
- template: /.pipelines/templates/approvalJob.yml@self
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/apiscan-gen-notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}:
Expand Down
1 change: 1 addition & 0 deletions .pipelines/templates/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,6 @@ jobs:
- template: /.pipelines/templates/obp-file-signing.yml@self
parameters:
binPath: $(DropRootPath)
OfficialBuild: $(ps_official_build)

- template: /.pipelines/templates/step/finalize.yml@self
1 change: 1 addition & 0 deletions .pipelines/templates/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions .pipelines/templates/windows-hosted-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,15 @@ 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') }}:
- template: /.pipelines/templates/obp-file-signing.yml@self
parameters:
binPath: '$(GlobalToolArtifactPath)/publish/PowerShell.Windows.x64/release'
globalTool: 'true'
OfficialBuild: $(ps_official_build)

- pwsh: |
Get-ChildItem '$(GlobalToolArtifactPath)/obj/PowerShell.Windows.x64/release'
Expand Down
12 changes: 7 additions & 5 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -2196,6 +2196,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."
}
Expand Down Expand Up @@ -2267,8 +2269,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
}

Expand Down
Loading