[release/v7.6.1] Build, package, and create VPack for the PowerShell-LTS store package within the same msixbundle-vpack pipeline (#150)#27237
Conversation
… within the same `msixbundle-vpack` pipeline (PowerShell#150) (PowerShell#27209)
There was a problem hiding this comment.
Pull request overview
Backport to release/v7.6.1 that updates the official MSIXBundle-vPack pipeline to build/sign/package the PowerShell LTS store MSIX packages and then create the MSIXBundle/VPack within the same pipeline, aligning with release compliance requirements. It also includes a few small refactors and string/resource updates in the product code.
Changes:
- Reworks
.pipelines/MSIXBundle-vPack-Official.ymlto build x64/arm64, sign outputs, package unsigned MSIX, bundle + sign MSIXBundle, and publish symbols. - Updates console host banner resource naming and adjusts several user-facing strings from “PowerShell Core” to “PowerShell 7+”.
- Minor cleanups/refactors in telemetry and build props formatting.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.pipelines/MSIXBundle-vPack-Official.yml |
Major pipeline restructuring to build/package/sign/bundle LTS store artifacts and publish symbols in one official pipeline run. |
tools/packaging/packaging.psm1 |
Comment cleanup in New-MSIXPackage (no functional change). |
src/System.Management.Automation/utils/Telemetry.cs |
Removes redundant initializer and simplifies intra-class method calls. |
src/System.Management.Automation/resources/TabCompletionStrings.resx |
Updates #requires -PSEdition completion descriptions. |
src/System.Management.Automation/resources/RemotingErrorIdStrings.resx |
Updates remoting error wording to “PowerShell 7+”. |
src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx |
Renames banner resource key to be product-generic. |
src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs |
Uses the renamed banner resource key and makes banner variable explicit type. |
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs |
Minor refactor using inherited static member access for stdout redirection flag. |
PowerShell.Common.props |
Whitespace-only tweak in MSBuild condition. |
| $msixPkgFile = Get-ChildItem -Path $repoRoot -Filter $msixPkgNameFilter -File | ||
| $msixPkgPath = $msixPkgFile.FullName |
There was a problem hiding this comment.
In the MSIX packaging step, Get-ChildItem -Filter "PowerShell*.msix" can return 0 or multiple files. The current code then dereferences .FullName without validating, which will either throw a null reference or silently pick multiple paths. Please assert exactly one MSIX is produced (or explicitly select the intended one) and throw a clear error if the count is not 1.
| $msixPkgFile = Get-ChildItem -Path $repoRoot -Filter $msixPkgNameFilter -File | |
| $msixPkgPath = $msixPkgFile.FullName | |
| $msixPkgFiles = @(Get-ChildItem -Path $repoRoot -Filter $msixPkgNameFilter -File) | |
| if ($msixPkgFiles.Count -ne 1) { | |
| $matchedMsixPaths = if ($msixPkgFiles.Count -gt 0) { | |
| ($msixPkgFiles | ForEach-Object { $_.FullName }) -join ', ' | |
| } | |
| else { | |
| '<none>' | |
| } | |
| throw "Expected exactly one MSIX package matching '$msixPkgNameFilter' in '$repoRoot', but found $($msixPkgFiles.Count): $matchedMsixPaths" | |
| } | |
| $msixPkgPath = $msixPkgFiles[0].FullName |
| - pwsh: | | ||
| $signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File | ||
| Write-Verbose -Verbose "Signed bundle: $signedBundle" | ||
|
|
||
| $signature = Get-AuthenticodeSignature -FilePath $signedBundle.FullName | ||
| if ($signature.Status -ne 'Valid') { | ||
| throw "The bundle file doesn't have a valid signature. Signature status: $($signature.Status)" | ||
| } |
There was a problem hiding this comment.
$signedBundle = Get-ChildItem -Filter "*.msixbundle" may return 0 or multiple bundles; the subsequent signature validation assumes a single file ($signedBundle.FullName and $signature.Status). Please validate the count is exactly 1 and fail with a clear message otherwise (or select the correct bundle deterministically).
| - name: WindowsContainerImage | ||
| value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' | ||
| - name: Codeql.Enabled | ||
| value: false # pipeline is not building artifacts; it repackages existing artifacts into a vpack |
There was a problem hiding this comment.
The Codeql.Enabled variable comment says the pipeline is not building artifacts/repackages existing artifacts, but this pipeline now performs a full build and packaging. Please update the comment (and/or the variable value if it is intended to control CodeQL behavior) to avoid misleading future maintainers.
| value: false # pipeline is not building artifacts; it repackages existing artifacts into a vpack | |
| value: false # CodeQL is intentionally disabled for this pipeline. |
Backport of #27209 to release/v7.6.1
Triggered by @daxian-dbw on behalf of @daxian-dbw
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Backports the pipeline update that builds, packages, publishes symbols, and creates the PowerShell LTS store VPack within the same official MSIXBundle-vPack pipeline to satisfy release packaging and compliance requirements.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Verified by cherry-picking the change onto release/v7.6.1 without conflicts. No local pipeline run was performed; CI on the backport PR will validate the updated packaging and VPack pipeline behavior in the release branch context.
Risk
REQUIRED: Check exactly one box.
High risk because the change affects official packaging, symbol publication, and VPack creation flows used for release infrastructure. The change cherry-picked cleanly, but pipeline behavior changes in this area have broad release impact.