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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resources:
ref: refs/heads/main

variables:
- template: ../templates/variables/PowerShell-Coordinated_Packages-Variables.yml
- template: ./pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The variables template include uses ./pipelines/templates/..., but templates are under .pipelines/. This path will fail template resolution; update to /.pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml@self (or ../templates/...).

Copilot uses AI. Check for mistakes.
parameters:
InternalSDKBlobURL: ${{ parameters.InternalSDKBlobURL }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
Expand Down Expand Up @@ -90,7 +90,7 @@ extends:
tsaOptionsFile: .config\tsaoptions.json

stages:
- template: ../templates/stages/PowerShell-Coordinated_Packages-Stages.yml
- template: ./pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The stages template include uses ./pipelines/templates/... instead of /.pipelines/templates/.... This will fail at pipeline compile time because there is no pipelines/ directory at repo root.

Copilot uses AI. Check for mistakes.
parameters:
RUN_WINDOWS: ${{ parameters.RUN_WINDOWS }}
RUN_TEST_AND_RELEASE: ${{ parameters.RUN_TEST_AND_RELEASE }}
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: pkgs-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId)

variables:
- template: ../templates/variables/PowerShell-Packages-Variables.yml
- template: ./pipelines/templates/variables/PowerShell-Packages-Variables.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The template path ./pipelines/templates/... points to a pipelines/ directory that doesn't exist in this repo (templates live under .pipelines/templates). This will break YAML template resolution for the NonOfficial pipeline. Use /.pipelines/templates/...@self (or revert to the prior ../templates/... relative path).

Copilot uses AI. Check for mistakes.
parameters:
debug: ${{ parameters.debug }}
ForceAzureBlobDelete: ${{ parameters.ForceAzureBlobDelete }}
Expand Down Expand Up @@ -92,6 +92,6 @@ extends:
enabled: false
tsaOptionsFile: .config\tsaoptions.json
stages:
- template: ../templates/stages/PowerShell-Packages-Stages.yml
- template: ./pipelines/templates/stages/PowerShell-Packages-Stages.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The stage template include uses ./pipelines/templates/..., but the repository directory is .pipelines/. This path will not resolve and will cause the pipeline to fail at compile time; use /.pipelines/templates/...@self (or the prior ../templates/...).

Suggested change
- template: ./pipelines/templates/stages/PowerShell-Packages-Stages.yml@self
- template: /.pipelines/templates/stages/PowerShell-Packages-Stages.yml@self

Copilot uses AI. Check for mistakes.
parameters:
OfficialBuild: false
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: ev2-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId)

variables:
- template: ../templates/variables/PowerShell-Release-Azure-Variables.yml
- template: ./pipelines/templates/variables/PowerShell-Release-Azure-Variables.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The variables template include uses ./pipelines/templates/..., but this repo's directory is .pipelines/. As written, the pipeline won't be able to resolve the template path. Use /.pipelines/templates/variables/PowerShell-Release-Azure-Variables.yml@self (or revert to the previous ../templates/...).

Suggested change
- template: ./pipelines/templates/variables/PowerShell-Release-Azure-Variables.yml@self
- template: /.pipelines/templates/variables/PowerShell-Release-Azure-Variables.yml@self

Copilot uses AI. Check for mistakes.
parameters:
debug: ${{ parameters.debug }}

Expand Down
4 changes: 2 additions & 2 deletions .pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: release-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId)

variables:
- template: ../templates/variables/PowerShell-Release-Variables.yml
- template: ./pipelines/templates/variables/PowerShell-Release-Variables.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The variables template include path ./pipelines/templates/... does not exist in this repo (directory is .pipelines/). This will break template expansion for the NonOfficial release pipeline; use /.pipelines/templates/variables/PowerShell-Release-Variables.yml@self (or revert to ../templates/...).

Suggested change
- template: ./pipelines/templates/variables/PowerShell-Release-Variables.yml@self
- template: /.pipelines/templates/variables/PowerShell-Release-Variables.yml@self

Copilot uses AI. Check for mistakes.
parameters:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
Expand Down Expand Up @@ -98,7 +98,7 @@ extends:
tsaOptionsFile: .config\tsaoptions.json

stages:
- template: ../templates/stages/PowerShell-Release-Stages.yml
- template: ./pipelines/templates/stages/PowerShell-Release-Stages.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The stages template include path ./pipelines/templates/... is missing the leading dot (.pipelines). This will fail template resolution; use /.pipelines/templates/stages/PowerShell-Release-Stages.yml@self (or the prior relative include).

Suggested change
- template: ./pipelines/templates/stages/PowerShell-Release-Stages.yml@self
- template: /.pipelines/templates/stages/PowerShell-Release-Stages.yml@self

Copilot uses AI. Check for mistakes.
parameters:
releaseEnvironment: Test
SkipPublish: ${{ parameters.SkipPublish }}
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: vPack_$(Build.SourceBranchName)_NonOfficial_Create.${{ parameters.createVPack }}_Name.${{ parameters.vPackName}}_$(date:yyyyMMdd).$(rev:rr)

variables:
- template: ../templates/variables/PowerShell-vPack-Variables.yml
- template: ./pipelines/templates/variables/PowerShell-vPack-Variables.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The variables template include uses ./pipelines/templates/..., but the repo uses .pipelines/templates. As written, the pipeline won't be able to find the template. Update the path to /.pipelines/templates/variables/PowerShell-vPack-Variables.yml@self (or revert to ../templates/...).

Suggested change
- template: ./pipelines/templates/variables/PowerShell-vPack-Variables.yml@self
- template: /.pipelines/templates/variables/PowerShell-vPack-Variables.yml@self

Copilot uses AI. Check for mistakes.
parameters:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
Expand Down Expand Up @@ -82,7 +82,7 @@ extends:
enabled: false
tsaOptionsFile: .config/tsaoptions.json
stages:
- template: ../templates/stages/PowerShell-vPack-Stages.yml
- template: ./pipelines/templates/stages/PowerShell-vPack-Stages.yml@self
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The stages template include uses ./pipelines/templates/... (missing the leading dot). This will fail template expansion because the directory is .pipelines/. Use /.pipelines/templates/stages/PowerShell-vPack-Stages.yml@self (or revert to ../templates/...).

Copilot uses AI. Check for mistakes.
parameters:
createVPack: ${{ parameters.createVPack }}
vPackName: ${{ parameters.vPackName }}
Binary file removed .pipelines/store/PDP/PDP-Media/en-US/Error.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .pipelines/store/PDP/PDP-Media/en-US/Prompt.png
Binary file not shown.
Binary file not shown.
Binary file removed .pipelines/store/PDP/PDP-Media/en-US/pwshLogo.png
Binary file not shown.
25 changes: 0 additions & 25 deletions .pipelines/store/PDP/PDP/en-US/PDP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,8 @@ PowerShell is Open Source. See https://github.com/powershell/powershell </Descr
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
<!-- Valid attributes: any of DesktopImage, MobileImage, XboxImage, SurfaceHubImage, and HoloLensImage -->
<Caption DesktopImage="Prompt.png" _locID="App_caption1">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 1" -->
Prompt
</Caption>
<Caption DesktopImage="Predictor_Inline.png" _locID="App_caption2">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 2" -->
Inline Prediction
</Caption>
<Caption DesktopImage="Predictor_ListView.png" _locID="App_caption3">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 3" -->
Prediction List View
</Caption>
<Caption DesktopImage="Error.png" _locID="App_caption4">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 4" -->
Error Feedback Provider
</Caption>
<Caption DesktopImage="Feedback_Provider.png" _locID="App_caption5">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 5" -->
Feedback Provider
</Caption>
<Caption DesktopImage="Experimental_Features.png" _locID="App_caption6">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 6" -->
Experimental Features
</Caption>
</ScreenshotCaptions>
<AdditionalAssets>
<Icon FileName="pwshLogo.png" />
<!-- Valid elements:-->
<!-- HeroImage414x180, HeroImage846x468, HeroImage558x756, HeroImage414x468, HeroImage558x558, HeroImage2400x1200,-->
<!-- ScreenshotWXGA, ScreenshotHD720, ScreenshotWVGA, Doublewide, Panoramic, Square,-->
Expand Down
197 changes: 0 additions & 197 deletions .pipelines/templates/package-create-msix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
variables:
- group: msixTools
- group: 'Azure Blob variable group'
- group: 'Store Publish Variables'
- name: ob_sdl_credscan_suppressionsFile
value: $(Build.SourcesDirectory)\PowerShell\.config\suppress.json
- name: ob_sdl_tsa_configFile
Expand Down Expand Up @@ -153,199 +152,3 @@ jobs:
Write-Verbose -Verbose "Uploaded Bundles:"
Get-ChildItem -Path $(ob_outputDirectory) | Write-Verbose -Verbose
displayName: Upload msixbundle to Artifacts

- pwsh: |
Write-Verbose -Verbose "Pipeline.Workspace: $(Pipeline.Workspace)"
Get-ChildItem -Path $(Pipeline.Workspace) -Recurse | Select-Object -ExpandProperty FullName
Write-Verbose -Verbose "System.DefaultWorkingDirectory: $(System.DefaultWorkingDirectory)"
Get-ChildItem -Path $(System.DefaultWorkingDirectory) -Recurse | Select-Object -ExpandProperty FullName
Test-Path -Path '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP-Private.xml' | Write-Verbose -Verbose
displayName: Output Pipeline.Workspace and System.DefaultWorkingDirectory

- template: channelSelection.yml@self

- pwsh: |
$IsLTS = '$(ChannelSelection.IsLTS)' -eq 'true'
$IsStable = '$(ChannelSelection.IsStable)' -eq 'true'
$IsPreview = '$(ChannelSelection.IsPreview)' -eq 'true'

Write-Verbose -Verbose "Channel Selection - LTS: $IsLTS, Stable: $IsStable, Preview: $IsPreview"

# Define app configurations for each channel
$channelConfigs = @{
'LTS' = @{
AppStoreName = 'PowerShell-LTS'
ProductId = '$(productId-LTS)'
AppId = '$(AppID-LTS)'
ServiceEndpoint = "StoreAppPublish-Stable"
}
'Stable' = @{
AppStoreName = 'PowerShell'
ProductId = '$(productId-Stable)'
AppId = '$(AppID-Stable)'
ServiceEndpoint = "StoreAppPublish-Stable"
}
'Preview' = @{
AppStoreName = 'PowerShell (Preview)'
ProductId = '$(productId-Preview)'
AppId = '$(AppID-Preview)'
ServiceEndpoint = "StoreAppPublish-Preview"
}
}

$currentChannel = if ($IsLTS) { 'LTS' }
elseif ($IsStable) { 'Stable' }
elseif ($IsPreview) { 'Preview' }
else {
Write-Error "No valid channel detected"
exit 1
}

$config = $channelConfigs[$currentChannel]
Write-Verbose -Verbose "Selected channel: $currentChannel"
Write-Verbose -Verbose "App Store Name: $($config.AppStoreName)"
Write-Verbose -Verbose "Product ID: $($config.ProductId)"

# Update PDP.xml file
$pdpPath = '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP/en-US/PDP.xml'
if (Test-Path $pdpPath) {
Write-Verbose -Verbose "Updating PDP file: $pdpPath"

[xml]$pdpXml = Get-Content $pdpPath -Raw

# Create namespace manager for XML with default namespace
$nsManager = New-Object System.Xml.XmlNamespaceManager($pdpXml.NameTable)
$nsManager.AddNamespace("pd", "http://schemas.microsoft.com/appx/2012/ProductDescription")

$appStoreNameElement = $pdpXml.SelectSingleNode("//pd:AppStoreName", $nsManager)
if ($appStoreNameElement) {
$appStoreNameElement.SetAttribute("_locID", $config.AppStoreName)
Write-Verbose -Verbose "Updated AppStoreName _locID to: $($config.AppStoreName)"
} else {
Write-Warning "AppStoreName element not found in PDP file"
}

$pdpXml.Save($pdpPath)
Write-Verbose -Verbose "PDP file updated successfully"
Get-Content -Path $pdpPath | Write-Verbose -Verbose
} else {
Write-Error "PDP file not found: $pdpPath"
exit 1
}

# Update SBConfig.json file
$sbConfigPath = '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/SBConfig.json'
if (Test-Path $sbConfigPath) {
Write-Verbose -Verbose "Updating SBConfig file: $sbConfigPath"

$sbConfigJson = Get-Content $sbConfigPath -Raw | ConvertFrom-Json

$sbConfigJson.appSubmission.productId = $config.ProductId
Write-Verbose -Verbose "Updated productId to: $($config.ProductId)"

$sbConfigJson | ConvertTo-Json -Depth 100 | Set-Content $sbConfigPath -Encoding UTF8
Write-Verbose -Verbose "SBConfig file updated successfully"
Get-Content -Path $sbConfigPath | Write-Verbose -Verbose
} else {
Write-Error "SBConfig file not found: $sbConfigPath"
exit 1
}

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

# Select the correct bundle based on channel
$bundleFiles = @(Get-ChildItem -Path '$(BundleDir)' -Filter '*.msixbundle')
Write-Verbose -Verbose "Available bundles: $($bundleFiles.Name -join ', ')"

if ($IsLTS) {
$bundleFile = $bundleFiles | Where-Object { $_.Name -match '-LTS-' }
} else {
# Catches Stable or Preview
$bundleFile = $bundleFiles | Where-Object { $_.Name -notmatch '-LTS-' }
}

if (-not $bundleFile) {
Write-Error "No matching bundle found for channel '$currentChannel'. Available bundles: $($bundleFiles.Name -join ', ')"
exit 1
}

# Copy the selected bundle to a dedicated directory for store packaging
$storeBundleDir = '$(Pipeline.Workspace)\releasePipeline\msix\store-bundle'
New-Item $storeBundleDir -Type Directory -Force > $null
Copy-Item -Path $bundleFile.FullName -Destination $storeBundleDir -Force -Verbose
Write-Host "##vso[task.setvariable variable=StoreBundleDir]$storeBundleDir"
Write-Verbose -Verbose "Selected bundle for store packaging: $($bundleFile.Name)"

# 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"

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: '$(StoreBundleDir)'
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 (Stable/LTS)'
condition: or(eq(variables['STABLE'], 'true'), eq(variables['LTS'], 'true'))
inputs:
serviceEndpoint: 'StoreAppPublish-Stable'
sbConfigPath: '$(SBConfigPath)'
sourceFolder: '$(StoreBundleDir)'
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'

- pwsh: |
Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue |
Copy-Item -Destination "$(ob_outputDirectory)" -Verbose
displayName: Upload Store Failure Log
condition: failed()

- pwsh: |
$submissionPackageDir = "$(System.DefaultWorkingDirectory)/SBOutDir"
$jsonFile = "$submissionPackageDir/PowerShellStorePackage.json"
$zipFile = "$submissionPackageDir/PowerShellStorePackage.zip"

if ((Test-Path $jsonFile) -and (Test-Path $zipFile)) {
Write-Verbose -Verbose "Uploading StoreBroker Package files:"
Write-Verbose -Verbose "JSON File: $jsonFile"
Write-Verbose -Verbose "ZIP File: $zipFile"

Copy-Item -Path $submissionPackageDir -Destination "$(ob_outputDirectory)" -Verbose -Recurse
}

else {
Write-Error "Required files not found in $submissionPackageDir"
}
displayName: 'Upload StoreBroker Package'
Loading
Loading