-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[release/v7.5] Merge the v7.6.0-preview.5 release branch back to master #26958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,10 @@ jobs: | |
| - 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 | ||
| value: $(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json | ||
| - name: ob_outputDirectory | ||
| value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT' | ||
|
|
||
|
|
@@ -145,16 +149,19 @@ jobs: | |
| '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" | ||
| } | ||
| } | ||
|
|
@@ -179,16 +186,21 @@ jobs: | |
|
|
||
| [xml]$pdpXml = Get-Content $pdpPath -Raw | ||
|
|
||
| $appStoreNameElement = $pdpXml.SelectSingleNode("//AppStoreName[@_locID]") | ||
| # 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.InnerText = $config.AppStoreName | ||
| Write-Verbose -Verbose "Updated AppStoreName to: $($config.AppStoreName)" | ||
| $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 | ||
|
|
@@ -206,62 +218,32 @@ jobs: | |
|
|
||
| $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)" | ||
|
Comment on lines
227
to
228
|
||
|
|
||
| # 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') | ||
| displayName: 'Create StoreBroker Package' | ||
| inputs: | ||
| serviceEndpoint: 'StoreAppPublish-Preview' | ||
| serviceEndpoint: 'StoreAppPublish-Private' | ||
| sbConfigPath: '$(SBConfigPath)' | ||
|
Comment on lines
232
to
236
|
||
| 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 (Stable/LTS)' | ||
| condition: or(eq(variables['STABLE'], 'true'), eq(variables['LTS'], 'true')) | ||
| inputs: | ||
| serviceEndpoint: 'StoreAppPublish-Stable' | ||
| 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' | ||
| - 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" | ||
|
|
@@ -279,4 +261,4 @@ jobs: | |
| else { | ||
| Write-Error "Required files not found in $submissionPackageDir" | ||
| } | ||
| displayName: 'Upload StoreBroker Package' | ||
| displayName: 'Upload StoreBroker Package' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,15 @@ jobs: | |
| artifactName: drop_msixbundle_CreateMSIXBundle | ||
| variables: | ||
| - group: 'Store Publish Variables' | ||
| - name: LTS | ||
| value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsLTS'] ] | ||
| - name: STABLE | ||
| value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsStable'] ] | ||
| - name: PREVIEW | ||
| value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ] | ||
| - template: ./variable/release-shared.yml@self | ||
| parameters: | ||
| RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ] | ||
| LTS: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsLTS'] ] | ||
| STABLE: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsStable'] ] | ||
| PREVIEW: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ] | ||
| steps: | ||
| - task: PowerShell@2 | ||
| inputs: | ||
|
|
@@ -40,15 +43,14 @@ jobs: | |
| } | ||
| $middleURL = '' | ||
| $tagString = "$(ReleaseTag)" | ||
| if ($tagString -match '-') { | ||
| if ($tagString -match '-preview') { | ||
| $middleURL = "preview" | ||
| } | ||
| elseif ($tagString -match '(\d+\.\d+)') { | ||
| $middleURL = $matches[1] | ||
| } | ||
|
|
||
|
|
||
| $endURL = $tagString -replace '^v','' -replace '\.','' | ||
| $endURL = $tagString -replace '^v|\.', '' | ||
| $message = "Changelog: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL" | ||
| Write-Verbose -Verbose "Release Notes for the Store:" | ||
| Write-Verbose -Verbose "$message" | ||
|
|
@@ -64,61 +66,32 @@ jobs: | |
| inputs: | ||
| targetType: inline | ||
| script: | | ||
| Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(Stable), Preview: $(Preview)" | ||
| # Convert ADO variables to PowerShell boolean variables | ||
| $IsLTS = '$(LTS)' -eq 'true' | ||
| $IsStable = '$(STABLE)' -eq 'true' | ||
| $IsPreview = '$(PREVIEW)' -eq 'true' | ||
|
|
||
| # Define app configurations for each channel using secret variables | ||
| $channelConfigs = @{ | ||
| 'LTS' = @{ | ||
| AppId = '$(AppID-LTS)' | ||
| ServiceEndpoint = 'StoreAppPublish-Stable' | ||
| } | ||
| 'Stable' = @{ | ||
| AppId = '$(AppID-Stable)' | ||
| ServiceEndpoint = 'StoreAppPublish-Stable' | ||
| } | ||
| 'Preview' = @{ | ||
| AppId = '$(AppID-Preview)' | ||
| ServiceEndpoint = 'StoreAppPublish-Preview' | ||
| } | ||
| } | ||
| Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(STABLE), Preview: $(PREVIEW)" | ||
|
|
||
| # Determine the current channel for logging purposes | ||
| $currentChannel = if ($IsLTS) { 'LTS' } | ||
| elseif ($IsStable) { 'Stable' } | ||
| elseif ($IsPreview) { 'Preview' } | ||
| else { | ||
| Write-Error "No valid channel detected" | ||
| exit 1 | ||
| } | ||
|
|
||
| # Assign AppID for Store-Publish Task | ||
| $appID = $null | ||
| if ($IsLTS) { | ||
| $appID = '$(AppID-LTS)' | ||
| } | ||
| elseif ($IsStable) { | ||
| $appID = '$(AppID-Stable)' | ||
| } | ||
| else { | ||
| $appID = '$(AppID-Preview)' | ||
| } | ||
|
|
||
| Write-Host "##vso[task.setvariable variable=AppID]$appID" | ||
|
|
||
| Write-Verbose -Verbose "Selected channel: $currentChannel" | ||
| Write-Verbose -Verbose "App ID: $($config.AppId)" | ||
| Write-Verbose -Verbose "Service Endpoint: $($config.ServiceEndpoint)" | ||
|
|
||
| # Set pipeline variables for use in the store-publish task | ||
| Write-Host "##vso[task.setvariable variable=SelectedAppId]$($config.AppId)" | ||
| Write-Host "##vso[task.setvariable variable=SelectedServiceEndpoint]$($config.ServiceEndpoint)" | ||
| Write-Host "##vso[task.setvariable variable=SelectedChannel]$currentChannel" | ||
| displayName: 'Set StoreBroker Configurations' | ||
| Write-Verbose -Verbose "Conditional tasks will handle the publishing based on channel variables" | ||
| displayName: 'Validate Channel Selection' | ||
|
|
||
| - 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('$(STABLE)', 'true'), eq('$(LTS)', 'true'))) | ||
| displayName: 'Publish LTS StoreBroker Package' | ||
| condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['LTS'], 'true')) | ||
| inputs: | ||
| serviceEndpoint: 'StoreAppPublish-Stable' | ||
| appId: '$(AppID)' | ||
| serviceEndpoint: 'StoreAppPublish-Private' | ||
| appId: '$(AppID-LTS)' | ||
| inputMethod: JsonAndZip | ||
| jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' | ||
| zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip' | ||
|
|
@@ -127,14 +100,32 @@ jobs: | |
| targetPublishMode: 'Immediate' | ||
|
|
||
| - task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3 | ||
| displayName: 'Publish StoreBroker Package (Preview)' | ||
| condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq('$(PREVIEW)', 'true')) | ||
| displayName: 'Publish Stable StoreBroker Package' | ||
| condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['STABLE'], 'true')) | ||
| inputs: | ||
| serviceEndpoint: 'StoreAppPublish-Preview' | ||
| appId: '$(AppID)' | ||
| serviceEndpoint: 'StoreAppPublish-Private' | ||
| appId: '$(AppID-Stable)' | ||
| inputMethod: JsonAndZip | ||
| jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' | ||
| zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip' | ||
| numberOfPackagesToKeep: 2 | ||
| jsonZipUpdateMetadata: true | ||
| targetPublishMode: 'Immediate' | ||
|
|
||
| - task: MS-RDX-MRO.windows-store-publish.publish-task.store-publish@3 | ||
| displayName: 'Publish Preview StoreBroker Package' | ||
| condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['PREVIEW'], 'true')) | ||
| inputs: | ||
| serviceEndpoint: 'StoreAppPublish-Private' | ||
| appId: '$(AppID-Preview)' | ||
| inputMethod: JsonAndZip | ||
| jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' | ||
| zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip' | ||
| numberOfPackagesToKeep: 2 | ||
| jsonZipUpdateMetadata: true | ||
| targetPublishMode: 'Immediate' | ||
|
|
||
| - pwsh: | | ||
| Get-Content -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue | ||
| displayName: Upload Store Failure Log | ||
| condition: failed() | ||
|
Comment on lines
+128
to
+131
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,7 +51,10 @@ jobs: | |
| - pwsh: | | ||
| $repoRoot = "$(Build.SourcesDirectory)" | ||
|
|
||
| $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
| Import-Module "$repoRoot/build.psm1" -Force -Verbose | ||
| Start-PSBootstrap -Scenario Dotnet | ||
|
Comment on lines
51
to
+55
|
||
|
|
||
| $env:DOTNET_NOLOGO=1 | ||
|
|
||
|
Comment on lines
+54
to
58
|
||
| $localLocation = "$(Pipeline.Workspace)/PSPackagesOfficial/drop_nupkg_build_nupkg" | ||
| $xmlElement = @" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PDP update logic now sets the
AppStoreNameelement’s_locIDattribute to values likePowerShell/PowerShell-LTS, but it does not set the element text. In the checked-in PDP.xml,<AppStoreName _locID="PowerShell-Private">currently has no inner text, so this change likely won’t update the Store name as intended. If the goal is to update the Store display name, set the element content (or clarify/update both_locIDand the text consistently with how StoreBroker expects this value).