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
5 changes: 3 additions & 2 deletions .pipelines/templates/linux-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ jobs:
'rpm-fxdependent' { 'Signed-fxdependent-linux-x64', 'powershell*.rpm' }
'rpm-fxdependent-arm64' { 'Signed-fxdependent-linux-arm64', 'powershell*.rpm' }
'rpm' { 'Signed-linux-x64', 'powershell*.rpm' }
'min-size' { 'Signed-linux-x64', 'powershell*.tar.gz' }
'min-size-x64' { 'Signed-linux-x64', 'powershell*.tar.gz' }
'min-size-arm64' { 'Signed-linux-arm64', 'powershell*.tar.gz' }
}

$signedFilesPath = "$(Pipeline.Workspace)/CoOrdinatedBuildPipeline/${signedDrop}/${signedFolder}"
Expand Down Expand Up @@ -173,7 +174,7 @@ jobs:

Start-PSPackage -Type $packageType -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath

if ($LTS) {
if ($LTS -and ($packageType -like 'deb*' -or $packageType -like 'rpm*')) {
Write-Verbose -Message "LTS Release: $LTS" -Verbose
Start-PSPackage -Type $packageType -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS
}
Expand Down
28 changes: 16 additions & 12 deletions .pipelines/templates/packaging/windows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ jobs:
- download: CoOrdinatedBuildPipeline
artifact: drop_windows_build_windows_${{ parameters.runtime }}_release
displayName: Download signed artifacts
condition: ${{ ne(parameters.runtime, 'minSize') }}
condition: ${{ not(contains(parameters.runtime, 'minsize')) }}

- download: CoOrdinatedBuildPipeline
artifact: drop_windows_build_windows_x64_${{ parameters.runtime }}
artifact: drop_windows_build_windows_${{ parameters.runtime }}
displayName: Download minsize signed artifacts
condition: ${{ eq(parameters.runtime, 'minSize') }}
condition: ${{ contains(parameters.runtime, 'minsize') }}

- pwsh: |
Write-Verbose -Verbose "signed artifacts"
Get-ChildItem "$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${{ parameters.runtime }}_release" -Recurse
Get-ChildItem "$(Pipeline.Workspace)\CoOrdinatedBuildPipeline" -Recurse
displayName: 'Capture Downloaded Artifacts'
# Diagnostics is not critical it passes every time it runs
continueOnError: true
Expand All @@ -91,7 +91,8 @@ jobs:
'arm64' { 'Signed-win-arm64' }
'fxdependent' { 'Signed-fxdependent' }
'fxdependentWinDesktop' { 'Signed-fxdependent-win-desktop' }
'minsize' { 'Signed-win7-x64' }
'x64_minsize' { 'Signed-win7-x64' }
'arm64_minsize' { 'Signed-win-arm64' }
}

Write-Verbose -Message "Init..." -Verbose
Expand All @@ -104,9 +105,9 @@ jobs:

Find-Dotnet

$signedFilesPath, $psoptionsFilePath = if ($env:RUNTIME -eq 'minsize') {
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_x64_${runtime}\$signedFolder"
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_x64_${runtime}\psoptions\psoptions.json"
$signedFilesPath, $psoptionsFilePath = if ($runtime.Contains('minsize')) {
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}\$signedFolder"
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}\psoptions\psoptions.json"
}
else {
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}_release\$signedFolder"
Expand Down Expand Up @@ -157,7 +158,8 @@ jobs:
'arm64' { 'win-arm64' }
'fxdependent' { 'win7-x64' }
'fxdependentWinDesktop' { 'win7-x64' }
'minsize' { 'win7-x64' }
'x64_minsize' { 'win7-x64' }
'arm64_minsize' { 'win-arm64' }
}

$packageTypes = switch ($runtime) {
Expand All @@ -166,7 +168,8 @@ jobs:
'arm64' { @('zip', 'msix') }
'fxdependent' { 'fxdependent' }
'fxdependentWinDesktop' { 'fxdependent-win-desktop' }
'minsize' { 'min-size' }
'x64_minsize' { 'min-size-x64' }
'arm64_minsize' { 'min-size-arm64' }
}

if (-not (Test-Path $(ob_outputDirectory))) {
Expand Down Expand Up @@ -198,14 +201,15 @@ jobs:
'arm64' { @('zip', 'msix') }
'fxdependent' { 'fxdependent' }
'fxdependentWinDesktop' { 'fxdependent-win-desktop' }
'minsize' { 'min-size' }
'x64_minsize' { 'min-size-x64' }
'arm64_minsize' { 'min-size-arm64' }
}

if (-not (Test-Path $(ob_outputDirectory))) {
New-Item -ItemType Directory -Path $(ob_outputDirectory) -Force
}

if ($packageTypes -contains 'zip' -or $packageTypes -contains 'fxdependent' -or $packageTypes -contains 'min-size' -or $packageTypes -contains 'fxdependent-win-desktop') {
if ($packageTypes -contains 'zip' -or $packageTypes -like 'fxdependent*' -or $packageTypes -like 'min-size*') {
$zipPkgNameFilter = "powershell-*.zip"
$zipPkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $zipPkgNameFilter -Recurse -File | Select-Object -ExpandProperty FullName
Write-Verbose -Verbose "unsigned zipPkgPath: $zipPkgPath"
Expand Down
5 changes: 3 additions & 2 deletions .pipelines/templates/packaging/windows/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ jobs:
'arm64' { @('zip', 'msix') }
'fxdependent' { 'fxdependent' }
'fxdependentWinDesktop' { 'fxdependent-win-desktop' }
'minsize' { 'min-size' }
'x64_minsize' { 'min-size-x64' }
'arm64_minsize' { 'min-size-arm64' }
}

if (-not (Test-Path $(ob_outputDirectory))) {
New-Item -ItemType Directory -Path $(ob_outputDirectory) -Force
}

if ($packageTypes -contains 'zip' -or $packageTypes -contains 'fxdependent' -or $packageTypes -contains 'min-size' -or $packageTypes -contains 'fxdependent-win-desktop') {
if ($packageTypes -contains 'zip' -or $packageTypes -like 'fxdependent*' -or $packageTypes -like 'min-size*') {
$zipPkgNameFilter = "powershell-*.zip"
$zipPkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $zipPkgNameFilter -Recurse -File | Select-Object -ExpandProperty FullName
Write-Verbose -Verbose "signed zipPkgPath: $zipPkgPath"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ stages:
JobName: 'linux_x64_minSize'
BuildConfiguration: 'minSize'

- template: /.pipelines/templates/linux.yml@self
parameters:
Runtime: 'linux-arm64'
JobName: 'linux_arm64_minSize'
BuildConfiguration: 'minSize'

- template: /.pipelines/templates/linux.yml@self
parameters:
Runtime: 'linux-arm'
Expand Down Expand Up @@ -134,6 +140,11 @@ stages:
Architecture: x64
BuildConfiguration: minSize
JobName: build_windows_x64_minSize_release
- template: /.pipelines/templates/windows-hosted-build.yml@self
parameters:
Architecture: arm64
BuildConfiguration: minSize
JobName: build_windows_arm64_minSize_release
- template: /.pipelines/templates/windows-hosted-build.yml@self
parameters:
Architecture: x86
Expand Down
23 changes: 19 additions & 4 deletions .pipelines/templates/stages/PowerShell-Packages-Stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ stages:

- template: /.pipelines/templates/packaging/windows/package.yml@self
parameters:
runtime: minsize
runtime: x64_minsize

- template: /.pipelines/templates/packaging/windows/package.yml@self
parameters:
runtime: arm64_minsize

- stage: windows_package_sign
displayName: 'Win Pkg Sign'
Expand Down Expand Up @@ -74,7 +78,11 @@ stages:

- template: /.pipelines/templates/packaging/windows/sign.yml@self
parameters:
runtime: minsize
runtime: x64_minsize

- template: /.pipelines/templates/packaging/windows/sign.yml@self
parameters:
runtime: arm64_minsize

- stage: linux_package
displayName: 'Linux Pkg+Sign'
Expand Down Expand Up @@ -161,8 +169,15 @@ stages:
parameters:
unsignedDrop: 'drop_linux_build_linux_x64_minSize'
signedDrop: 'drop_linux_sign_linux_x64_minSize'
packageType: min-size
jobName: minSize
packageType: min-size-x64
jobName: minSize_x64

- template: /.pipelines/templates/linux-package-build.yml@self
parameters:
unsignedDrop: 'drop_linux_build_linux_arm64_minSize'
signedDrop: 'drop_linux_sign_linux_arm64_minSize'
packageType: min-size-arm64
jobName: minSize_arm64

- stage: nupkg
displayName: 'NuGet Pkg+Sign'
Expand Down
32 changes: 28 additions & 4 deletions .pipelines/templates/uploadToAzure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download deb package

- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifact: drop_linux_package_deb_arm64
itemPattern: '**/*.deb'
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download deb arm64 package

- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
Expand Down Expand Up @@ -83,10 +91,18 @@ jobs:
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifact: drop_linux_package_minSize
artifact: drop_linux_package_minSize_x64
itemPattern: '**/*.tar.gz'
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download linux minSize x64 package

- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifact: drop_linux_package_minSize_arm64
itemPattern: '**/*.tar.gz'
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download linux minSize package
displayName: Download linux minSize arm64 package

- task: DownloadPipelineArtifact@2
inputs:
Expand Down Expand Up @@ -173,10 +189,18 @@ jobs:
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifact: drop_windows_package_package_win_minsize
artifact: drop_windows_package_package_win_x64_minsize
itemPattern: '**/*.zip'
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download windows x64 minsize packages

- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifact: drop_windows_package_package_win_arm64_minsize
itemPattern: '**/*.zip'
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download windows minsize packages
displayName: Download windows arm64 minsize packages

- task: DownloadPipelineArtifact@2
inputs:
Expand Down
6 changes: 3 additions & 3 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ function Start-PSBuild {
}

if ($ForMinimalSize) {
if ($Runtime -and "linux-x64", "win7-x64", "osx-x64" -notcontains $Runtime) {
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win7-x64', 'osx-x64'"
if ($Runtime -and "linux-x64", "linux-arm64", "win7-x64", "win-arm64", "osx-x64", "osx-arm64" -notcontains $Runtime) {
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'linux-arm64', 'win7-x64', 'win-arm64', 'osx-x64', 'osx-arm64'"
}
}

Expand Down Expand Up @@ -3192,7 +3192,7 @@ function Start-TypeGen

Push-Location "$PSScriptRoot/src/TypeCatalogGen"
try {
Start-NativeExecution { dotnet run ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs $IncFileName }
Start-NativeExecution { dotnet run -- ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs $IncFileName }
} finally {
Pop-Location
}
Expand Down
2 changes: 0 additions & 2 deletions tools/packaging/packaging.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
CmdletsToExport = @()
FunctionsToExport = @(
'Expand-PSSignedBuild'
'Invoke-AzDevOpsLinuxPackageBuild'
'Invoke-AzDevOpsLinuxPackageCreation'
'New-DotnetSdkContainerFxdPackage'
'Start-PrepForGlobalToolNupkg'
'New-GlobalToolNupkgSource'
Expand Down
Loading
Loading