Skip to content

Commit 9fef026

Browse files
authored
Merge the v7.6.0-preview.5 release branch back to master
The v7.6.0-preview.5 release is done. Merge the release branch back to master using a merge commit.
2 parents 38f7f93 + 8a723f8 commit 9fef026

10 files changed

+307
-50
lines changed

.pipelines/PowerShell-Release-Official.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ extends:
156156
parameters:
157157
jobName: "LinuxSDK"
158158
displayName: "Linux SDK Validation"
159-
imageName: PSMMSUbuntu20.04-Secure
159+
imageName: PSMMSUbuntu22.04-Secure
160160
poolName: $(ubuntuPool)
161161

162162
- stage: gbltool
@@ -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/channelSelection.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
steps:
22
- pwsh: |
33
# Determine LTS, Preview, or Stable
4-
$metadata = Get-Content "$repoRoot/tools/metadata.json" -Raw | ConvertFrom-Json
4+
$metadata = Get-Content "$(Build.SourcesDirectory)/PowerShell/tools/metadata.json" -Raw | ConvertFrom-Json
55
$LTS = $metadata.LTSRelease.Latest
66
$Stable = $metadata.StableRelease.Latest
77
$isPreview = '$(OutputReleaseTag.releaseTag)' -match '-'

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

Lines changed: 25 additions & 6 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,27 +210,34 @@ 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
204217
}
205218
206219
Write-Host "##vso[task.setvariable variable=ServiceConnection]$($config.ServiceEndpoint)"
207-
Write-Host "##vso[task.setvariable variable=SBConfigPath]$($config.SBConfigPath)"
220+
Write-Host "##vso[task.setvariable variable=SBConfigPath]$($sbConfigPath)"
208221
name: UpdateConfigs
209222
displayName: Update PDPs and SBConfig.json
210223
211-
- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@3
224+
- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
212225
displayName: 'Create StoreBroker Package'
213226
inputs:
214-
serviceEndpoint: '$(ServiceConnection)'
227+
serviceEndpoint: 'StoreAppPublish-Private'
215228
sbConfigPath: '$(SBConfigPath)'
216229
sourceFolder: '$(BundleDir)'
217230
contents: '*.msixBundle'
218231
outSBName: 'PowerShellStorePackage'
219232
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
220233
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
221234

235+
- pwsh: |
236+
Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue |
237+
Copy-Item -Destination "$(ob_outputDirectory)" -Verbose
238+
displayName: Upload Store Failure Log
239+
condition: failed()
240+
222241
- pwsh: |
223242
$submissionPackageDir = "$(System.DefaultWorkingDirectory)/SBOutDir"
224243
$jsonFile = "$submissionPackageDir/PowerShellStorePackage.json"

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

Lines changed: 50 additions & 34 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,14 +43,14 @@ 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+)') {
4750
$middleURL = $matches[1]
4851
}
4952
50-
$endURL = $tagString -replace '[v\.]',''
53+
$endURL = $tagString -replace '^v|\.', ''
5154
$message = "Changelog: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
5255
Write-Verbose -Verbose "Release Notes for the Store:"
5356
Write-Verbose -Verbose "$message"
@@ -63,25 +66,14 @@ jobs:
6366
inputs:
6467
targetType: inline
6568
script: |
66-
Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(Stable), Preview: $(Preview)"
69+
# Convert ADO variables to PowerShell boolean variables
70+
$IsLTS = '$(LTS)' -eq 'true'
71+
$IsStable = '$(STABLE)' -eq 'true'
72+
$IsPreview = '$(PREVIEW)' -eq 'true'
6773
68-
# Define app configurations for each channel using secret variables
69-
$channelConfigs = @{
70-
'LTS' = @{
71-
AppId = '$(AppID-LTS)'
72-
ServiceEndpoint = 'StoreAppPublish-Stable'
73-
}
74-
'Stable' = @{
75-
AppId = '$(AppID-Stable)'
76-
ServiceEndpoint = 'StoreAppPublish-Stable'
77-
}
78-
'Preview' = @{
79-
AppId = '$(AppID-Preview)'
80-
ServiceEndpoint = 'StoreAppPublish-Preview'
81-
}
82-
}
74+
Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(STABLE), Preview: $(PREVIEW)"
8375
84-
# Determine the current channel
76+
# Determine the current channel for logging purposes
8577
$currentChannel = if ($IsLTS) { 'LTS' }
8678
elseif ($IsStable) { 'Stable' }
8779
elseif ($IsPreview) { 'Preview' }
@@ -90,26 +82,50 @@ jobs:
9082
exit 1
9183
}
9284
93-
$config = $channelConfigs[$currentChannel]
9485
Write-Verbose -Verbose "Selected channel: $currentChannel"
95-
Write-Verbose -Verbose "App ID: $($config.AppId)"
96-
Write-Verbose -Verbose "Service Endpoint: $($config.ServiceEndpoint)"
97-
98-
# Set pipeline variables for use in the store-publish task
99-
Write-Host "##vso[task.setvariable variable=SelectedAppId]$($config.AppId)"
100-
Write-Host "##vso[task.setvariable variable=SelectedServiceEndpoint]$($config.ServiceEndpoint)"
101-
Write-Host "##vso[task.setvariable variable=SelectedChannel]$currentChannel"
102-
displayName: 'Set StoreBroker Configurations'
86+
Write-Verbose -Verbose "Conditional tasks will handle the publishing based on channel variables"
87+
displayName: 'Validate Channel Selection'
10388

10489
- task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3
10590
displayName: 'Publish LTS StoreBroker Package'
106-
condition: ne('${{ parameters.skipMSIXPublish }}', 'true')
91+
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['LTS'], 'true'))
10792
inputs:
108-
serviceEndpoint: '$(SelectedServiceEndpoint)'
109-
appId: '$(SelectedAppId)'
93+
serviceEndpoint: 'StoreAppPublish-Private'
94+
appId: '$(AppID-LTS)'
11095
inputMethod: JsonAndZip
11196
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
11297
zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip'
11398
numberOfPackagesToKeep: 2
11499
jsonZipUpdateMetadata: true
115100
targetPublishMode: 'Immediate'
101+
102+
- task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3
103+
displayName: 'Publish Stable StoreBroker Package'
104+
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['STABLE'], 'true'))
105+
inputs:
106+
serviceEndpoint: 'StoreAppPublish-Private'
107+
appId: '$(AppID-Stable)'
108+
inputMethod: JsonAndZip
109+
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
110+
zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip'
111+
numberOfPackagesToKeep: 2
112+
jsonZipUpdateMetadata: true
113+
targetPublishMode: 'Immediate'
114+
115+
- task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3
116+
displayName: 'Publish Preview StoreBroker Package'
117+
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['PREVIEW'], 'true'))
118+
inputs:
119+
serviceEndpoint: 'StoreAppPublish-Private'
120+
appId: '$(AppID-Preview)'
121+
inputMethod: JsonAndZip
122+
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
123+
zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip'
124+
numberOfPackagesToKeep: 2
125+
jsonZipUpdateMetadata: true
126+
targetPublishMode: 'Immediate'
127+
128+
- pwsh: |
129+
Get-Content -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue
130+
displayName: Upload Store Failure Log
131+
condition: failed()

.pipelines/templates/release-githubNuget.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ jobs:
121121
$middleURL = ''
122122
$tagString = "$(ReleaseTag)"
123123
Write-Verbose -Verbose "Use the following command to push the tag:"
124-
if ($tagString -match '-') {
124+
if ($tagString -match '-preview') {
125125
$middleURL = "preview"
126126
}
127127
elseif ($tagString -match '(\d+\.\d+)') {
128128
$middleURL = $matches[1]
129129
}
130-
$endURL = $tagString -replace '[v\.]',''
130+
$endURL = $tagString -replace '^v|\.', ''
131131
$message = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
132132
Write-Verbose -Verbose "git tag -a $(ReleaseTag) $env:BUILD_SOURCEVERSION -m $message"
133133
displayName: Git Push Tag Command

.pipelines/templates/release-validate-globaltools.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
- pwsh: |
4444
$repoRoot = "$(Build.SourcesDirectory)/PowerShell"
4545
46+
Import-Module "$repoRoot/build.psm1" -Force -Verbose
47+
Start-PSBootstrap -Scenario Dotnet
48+
4649
$toolPath = New-Item -ItemType Directory "$(System.DefaultWorkingDirectory)/toolPath" | Select-Object -ExpandProperty FullName
4750
4851
Write-Verbose -Verbose "dotnet tool list -g"
@@ -75,6 +78,9 @@ jobs:
7578
- pwsh: |
7679
$repoRoot = "$(Build.SourcesDirectory)/PowerShell"
7780
81+
Import-Module "$repoRoot/build.psm1" -Force -Verbose
82+
Start-PSBootstrap -Scenario Dotnet
83+
7884
$exeName = if ($IsWindows) { "pwsh.exe" } else { "pwsh" }
7985
8086
$toolPath = "$(System.DefaultWorkingDirectory)/toolPath/${{ parameters.globalToolExeName }}"

.pipelines/templates/release-validate-sdk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
- pwsh: |
5252
$repoRoot = "$(Build.SourcesDirectory)"
5353
54+
Import-Module "$repoRoot/build.psm1" -Force -Verbose
55+
Start-PSBootstrap -Scenario Dotnet
56+
5457
$env:DOTNET_NOLOGO=1
5558
5659
$localLocation = "$(Pipeline.Workspace)/PSPackagesOfficial/drop_nupkg_build_nupkg"

.pipelines/templates/windows-hosted-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ jobs:
272272
'Microsoft.PowerShell.PSResourceGet'
273273
'Microsoft.PowerShell.Archive'
274274
'PSReadLine'
275-
'ThreadJob'
275+
'Microsoft.PowerShell.ThreadJob'
276276
)
277277
278278
$sourceModulePath = Join-Path '$(GlobalToolArtifactPath)' 'publish' 'PowerShell.Windows.x64' 'release' 'Modules'

0 commit comments

Comments
 (0)