Separate Store Package Creation, Skip Polling for Store Publish, Clean up PDP-Media (#27024)

Co-authored-by: Justin Chung <chungjustin@microsoft.com>
This commit is contained in:
Justin Chung
2026-04-01 13:20:45 -05:00
committed by GitHub
co-authored by Justin Chung
parent ff37ab4539
commit 45a80d9a48
18 changed files with 266 additions and 236 deletions
@@ -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
parameters:
InternalSDKBlobURL: ${{ parameters.InternalSDKBlobURL }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
@@ -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
parameters:
RUN_WINDOWS: ${{ parameters.RUN_WINDOWS }}
RUN_TEST_AND_RELEASE: ${{ parameters.RUN_TEST_AND_RELEASE }}
@@ -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
parameters:
debug: ${{ parameters.debug }}
ForceAzureBlobDelete: ${{ parameters.ForceAzureBlobDelete }}
@@ -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
parameters:
OfficialBuild: false
@@ -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
parameters:
debug: ${{ parameters.debug }}
@@ -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
parameters:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
@@ -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
parameters:
releaseEnvironment: Test
SkipPublish: ${{ parameters.SkipPublish }}
@@ -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
parameters:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
@@ -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
parameters:
createVPack: ${{ parameters.createVPack }}
vPackName: ${{ parameters.vPackName }}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

-25
View File
@@ -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,-->
@@ -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
@@ -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'
@@ -0,0 +1,242 @@
jobs:
- job: CreateStorePackage
displayName: Create StoreBroker Package
pool:
type: windows
variables:
- 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
value: $(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
- name: ob_outputDirectory
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
- name: ob_signing_setup_enabled
value: false
- name: ob_sdl_codeSignValidation_enabled
value: false
steps:
- checkout: self
clean: true
- template: release-SetReleaseTagandContainerName.yml@self
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifact: drop_msixbundle_CreateMSIXBundle
itemPattern: |
**/*.msixbundle
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
displayName: Download signed msixbundle
- pwsh: |
$bundleDir = '$(Build.ArtifactStagingDirectory)/downloads'
$bundle = Get-ChildItem -Path $bundleDir -Filter '*.msixbundle' -Recurse | Select-Object -First 1
if (-not $bundle) {
Write-Error "No .msixbundle file found in $bundleDir"
exit 1
}
Write-Verbose -Verbose "Found bundle: $($bundle.FullName)"
$vstsCommandString = "vso[task.setvariable variable=BundleDir]$($bundle.DirectoryName)"
Write-Host "##$vstsCommandString"
displayName: Locate msixbundle
- 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'
- 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'
- pwsh: |
$outputDirectory = "$(ob_outputDirectory)"
if (-not (Test-Path -LiteralPath $outputDirectory)) {
New-Item -ItemType Directory -Path $outputDirectory -Force | Out-Null
}
Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue |
Copy-Item -Destination $outputDirectory -Verbose
displayName: Upload Store Failure Log
condition: failed()
- pwsh: |
$outputDirectory = "$(ob_outputDirectory)"
if (-not (Test-Path -LiteralPath $outputDirectory)) {
New-Item -ItemType Directory -Path $outputDirectory -Force | Out-Null
}
$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 $outputDirectory -Verbose -Recurse
}
else {
Write-Error "Required files not found in $submissionPackageDir"
exit 1
}
displayName: 'Upload StoreBroker Package'
@@ -12,7 +12,7 @@ jobs:
inputs:
- input: pipelineArtifact
pipeline: PSPackagesOfficial
artifactName: drop_msixbundle_CreateMSIXBundle
artifactName: drop_store_package_CreateStorePackage
variables:
- group: 'Store Publish Variables'
- name: LTS
@@ -107,28 +107,32 @@ jobs:
- task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3
displayName: 'Publish StoreBroker Package (Stable/LTS)'
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), or(eq(variables['STABLE'], 'true'), eq(variables['LTS'], 'true')))
continueOnError: true
condition: and(not(${{ parameters.skipMSIXPublish }}), or(eq(variables['STABLE'], 'true'), eq(variables['LTS'], 'true')))
inputs:
serviceEndpoint: 'StoreAppPublish-Stable'
appId: '$(AppID)'
inputMethod: JsonAndZip
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip'
force: true
deletePackages: true
numberOfPackagesToKeep: 2
jsonZipUpdateMetadata: true
targetPublishMode: 'Immediate'
skipPolling: true
- task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3
displayName: 'Publish StoreBroker Package (Preview)'
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['PREVIEW'], 'true'))
continueOnError: true
condition: and(not(${{ parameters.skipMSIXPublish }}), eq(variables['PREVIEW'], 'true'))
inputs:
serviceEndpoint: 'StoreAppPublish-Preview'
appId: '$(AppID)'
inputMethod: JsonAndZip
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip'
force: true
deletePackages: true
numberOfPackagesToKeep: 2
jsonZipUpdateMetadata: true
targetPublishMode: 'Immediate'
skipPolling: true
@@ -173,6 +173,12 @@ stages:
parameters:
OfficialBuild: ${{ parameters.OfficialBuild }}
- stage: store_package
displayName: 'Store Package'
dependsOn: [msixbundle]
jobs:
- template: /.pipelines/templates/package-store-package.yml@self
- stage: upload
displayName: 'Upload'
dependsOn: [prep, mac_package, windows_package_sign, linux_package, nupkg, msixbundle] # prep needed for BuildInfo JSON