Skip to content
Merged
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
40 changes: 38 additions & 2 deletions .pipelines/templates/package-create-msix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,49 @@ jobs:

Write-Host "##vso[task.setvariable variable=ServiceConnection]$($config.ServiceEndpoint)"
Write-Host "##vso[task.setvariable variable=SBConfigPath]$($sbConfigPath)"

# These variables are used in the next tasks to determine which ServiceEndpoint to use
$ltsValue = $IsLTS.ToString().ToLower()
$stableValue = $IsStable.ToString().ToLower()
$previewValue = $IsPreview.ToString().ToLower()

Write-Verbose -Verbose "About to set variables:"
Write-Verbose -Verbose " LTS=$ltsValue"
Write-Verbose -Verbose " STABLE=$stableValue"
Write-Verbose -Verbose " PREVIEW=$previewValue"

Write-Host "##vso[task.setvariable variable=LTS]$ltsValue"
Write-Host "##vso[task.setvariable variable=STABLE]$stableValue"
Write-Host "##vso[task.setvariable variable=PREVIEW]$previewValue"
Comment on lines 225 to +240

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new LTS/STABLE/PREVIEW variable plumbing makes the previously-set ServiceConnection value redundant: ServiceConnection is still set from $config.ServiceEndpoint, but it is never referenced anywhere else in this template, and $config.ServiceEndpoint itself is only used for that variable. Consider removing ServiceConnection/ServiceEndpoint from this step (or wiring tasks to use it, if that’s intended) to avoid dead code and configuration drift.

Copilot uses AI. Check for mistakes.

Write-Verbose -Verbose "Variables set successfully"
name: UpdateConfigs
displayName: Update PDPs and SBConfig.json

- pwsh: |
Write-Verbose -Verbose "Checking variables after UpdateConfigs:"
Write-Verbose -Verbose "LTS=$(LTS)"
Write-Verbose -Verbose "STABLE=$(STABLE)"
Write-Verbose -Verbose "PREVIEW=$(PREVIEW)"
displayName: Debug - Check Variables

- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
displayName: 'Create StoreBroker Package (Preview)'
condition: eq(variables['PREVIEW'], 'true')
inputs:
serviceEndpoint: 'StoreAppPublish-Preview'
sbConfigPath: '$(SBConfigPath)'
sourceFolder: '$(BundleDir)'
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'

- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
displayName: 'Create StoreBroker Package'
displayName: 'Create StoreBroker Package (Stable/LTS)'
condition: or(eq(variables['STABLE'], 'true'), eq(variables['LTS'], 'true'))
inputs:
serviceEndpoint: 'StoreAppPublish-Private'
serviceEndpoint: 'StoreAppPublish-Stable'
sbConfigPath: '$(SBConfigPath)'
sourceFolder: '$(BundleDir)'
contents: '*.msixBundle'
Expand Down
Loading