[release/v7.4.14] Bring over all changes for MSIX packaging template (#26932)#26933
Conversation
There was a problem hiding this comment.
Pull request overview
Backports the MSIX packaging template updates from #26932 into release/v7.4.14, adding explicit Stable/LTS vs Preview handling so the correct Microsoft Store service connection is used when creating StoreBroker packages.
Changes:
- Sets pipeline variables (
LTS,STABLE,PREVIEW) based onChannelSelection.*values. - Splits StoreBroker package creation into separate tasks for Preview vs Stable/LTS with channel-based conditions.
- Adds a small debug step to print the channel variables after they’re set.
Comments suppressed due to low confidence (1)
.pipelines/templates/package-create-msix.yml:273
- Same casing inconsistency for the bundle glob here (
*.msixBundlevs*.msixbundleelsewhere). Aligning this reduces the chance of missing the bundle due to case-sensitive matching in the task implementation.
sourceFolder: '$(BundleDir)'
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
| @@ -224,13 +224,49 @@ jobs: | |||
|
|
|||
| Write-Host "##vso[task.setvariable variable=ServiceConnection]$($config.ServiceEndpoint)" | |||
There was a problem hiding this comment.
ServiceConnection is being set here, but it’s no longer referenced by any subsequent task inputs/conditions in this template (the store-package tasks now hardcode StoreAppPublish-*). This looks like leftover logic and can be misleading; either remove it or switch the store-package tasks to use $(ServiceConnection) so the selected endpoint is defined in one place.
| Write-Host "##vso[task.setvariable variable=ServiceConnection]$($config.ServiceEndpoint)" |
| displayName: 'Create StoreBroker Package (Preview)' | ||
| condition: eq(variables['PREVIEW'], 'true') |
There was a problem hiding this comment.
This condition overrides the default succeeded() behavior. As written, the StoreBroker package task can still run even if earlier steps in the job failed (e.g., failed signing or failed PDP/SBConfig update), as long as PREVIEW is true. Add succeeded() (or and(succeeded(), ...)) to prevent packaging on a failed job.
| displayName: 'Create StoreBroker Package (Stable/LTS)' | ||
| condition: or(eq(variables['STABLE'], 'true'), eq(variables['LTS'], 'true')) |
There was a problem hiding this comment.
Same issue as the Preview task: this custom condition drops the implicit succeeded() guard, so the Stable/LTS StoreBroker package task may run even after earlier failures if one of these variables is true. Update the condition to include succeeded() (or explicitly choose a different failure behavior).
| sourceFolder: '$(BundleDir)' | ||
| contents: '*.msixBundle' | ||
| outSBName: 'PowerShellStorePackage' |
There was a problem hiding this comment.
The glob pattern uses *.msixBundle (capital B) while the rest of the template consistently uses *.msixbundle. For consistency (and to avoid any task/glob implementation that treats patterns case-sensitively), use the same casing everywhere.
Backport of #26932 to release/v7.4.14
Triggered by @jshigetomi
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
Reconstructs the MSIX package template to match master
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Risk
REQUIRED: Check exactly one box.