Skip to content

Commit 08f8078

Browse files
[release/v7.4] Backport Store publishing improvements (#26401)
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>
1 parent cd673a3 commit 08f8078

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

.pipelines/PowerShell-Release-Official.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,12 @@ extends:
365365
This is typically done by the community 1-2 days after the release.
366366
367367
- stage: PublishMsix
368-
dependsOn: PushGitTagAndMakeDraftPublic
368+
dependsOn:
369+
- setReleaseTagAndChangelog
370+
- PushGitTagAndMakeDraftPublic
369371
displayName: Publish MSIX to store
370372
variables:
371-
ob_release_environment: Production
373+
ob_release_environment: ${{ variables.releaseEnvironment }}
372374
jobs:
373375
- template: /.pipelines/templates/release-MSIX-Publish.yml@self
374376
parameters:

.pipelines/store/SBConfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"packageParameters": {
55
"PDPRootPath": "",
66
"Release": "",
7-
"PDPInclude": [],
7+
"PDPInclude": [
8+
"PDP.xml"
9+
],
810
"PDPExclude": [],
911
"LanguageExclude": [
1012
"default",
@@ -21,7 +23,7 @@
2123
},
2224
"appSubmission": {
2325
"productId": "",
24-
"targetPublishMode": "NotSet",
26+
"targetPublishMode": "Immediate",
2527
"targetPublishDate": null,
2628
"visibility": "NotSet",
2729
"pricing": {

.pipelines/templates/package-create-msix.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ jobs:
88
- group: msixTools
99
- group: 'Azure Blob variable group'
1010
- group: 'Store Publish Variables'
11+
- name: ob_sdl_credscan_suppressionsFile
12+
value: $(Build.SourcesDirectory)\PowerShell\.config\suppress.json
13+
- name: ob_sdl_tsa_configFile
14+
value: $(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
1115
- name: ob_outputDirectory
1216
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
1317

@@ -137,16 +141,19 @@ jobs:
137141
'LTS' = @{
138142
AppStoreName = 'PowerShell-LTS'
139143
ProductId = '$(productId-LTS)'
144+
AppId = '$(AppID-LTS)'
140145
ServiceEndpoint = "StoreAppPublish-Stable"
141146
}
142147
'Stable' = @{
143148
AppStoreName = 'PowerShell'
144149
ProductId = '$(productId-Stable)'
150+
AppId = '$(AppID-Stable)'
145151
ServiceEndpoint = "StoreAppPublish-Stable"
146152
}
147153
'Preview' = @{
148154
AppStoreName = 'PowerShell (Preview)'
149155
ProductId = '$(productId-Preview)'
156+
AppId = '$(AppID-Preview)'
150157
ServiceEndpoint = "StoreAppPublish-Preview"
151158
}
152159
}
@@ -171,16 +178,21 @@ jobs:
171178
172179
[xml]$pdpXml = Get-Content $pdpPath -Raw
173180
174-
$appStoreNameElement = $pdpXml.SelectSingleNode("//AppStoreName[@_locID]")
181+
# Create namespace manager for XML with default namespace
182+
$nsManager = New-Object System.Xml.XmlNamespaceManager($pdpXml.NameTable)
183+
$nsManager.AddNamespace("pd", "http://schemas.microsoft.com/appx/2012/ProductDescription")
184+
185+
$appStoreNameElement = $pdpXml.SelectSingleNode("//pd:AppStoreName", $nsManager)
175186
if ($appStoreNameElement) {
176-
$appStoreNameElement.InnerText = $config.AppStoreName
177-
Write-Verbose -Verbose "Updated AppStoreName to: $($config.AppStoreName)"
187+
$appStoreNameElement.SetAttribute("_locID", $config.AppStoreName)
188+
Write-Verbose -Verbose "Updated AppStoreName _locID to: $($config.AppStoreName)"
178189
} else {
179190
Write-Warning "AppStoreName element not found in PDP file"
180191
}
181192
182193
$pdpXml.Save($pdpPath)
183194
Write-Verbose -Verbose "PDP file updated successfully"
195+
Get-Content -Path $pdpPath | Write-Verbose -Verbose
184196
} else {
185197
Write-Error "PDP file not found: $pdpPath"
186198
exit 1
@@ -198,6 +210,7 @@ jobs:
198210
199211
$sbConfigJson | ConvertTo-Json -Depth 100 | Set-Content $sbConfigPath -Encoding UTF8
200212
Write-Verbose -Verbose "SBConfig file updated successfully"
213+
Get-Content -Path $sbConfigPath | Write-Verbose -Verbose
201214
} else {
202215
Write-Error "SBConfig file not found: $sbConfigPath"
203216
exit 1
@@ -237,6 +250,12 @@ jobs:
237250
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
238251
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
239252

253+
- pwsh: |
254+
Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue |
255+
Copy-Item -Destination "$(ob_outputDirectory)" -Verbose
256+
displayName: Upload Store Failure Log
257+
condition: failed()
258+
240259
- pwsh: |
241260
$submissionPackageDir = "$(System.DefaultWorkingDirectory)/SBOutDir"
242261
$jsonFile = "$submissionPackageDir/PowerShellStorePackage.json"

.pipelines/templates/release-MSIX-Publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ jobs:
1515
artifactName: drop_msixbundle_CreateMSIXBundle
1616
variables:
1717
- group: 'Store Publish Variables'
18+
- name: LTS
19+
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsLTS'] ]
20+
- name: STABLE
21+
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsStable'] ]
22+
- name: PREVIEW
23+
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ]
1824
- template: ./variable/release-shared.yml@self
1925
parameters:
2026
RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ]
21-
LTS: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsLTS'] ]
22-
STABLE: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsStable'] ]
23-
PREVIEW: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ]
2427
steps:
2528
- task: PowerShell@2
2629
inputs:
@@ -40,7 +43,7 @@ jobs:
4043
}
4144
$middleURL = ''
4245
$tagString = "$(ReleaseTag)"
43-
if ($tagString -match '-') {
46+
if ($tagString -match '-preview') {
4447
$middleURL = "preview"
4548
}
4649
elseif ($tagString -match '(\d+\.\d+)') {

0 commit comments

Comments
 (0)