From 9c9dc541c778d7e2188e405d7355df77054e65eb Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 2 Oct 2025 10:56:22 -0700 Subject: [PATCH 01/16] Use StoreAppPublish-Preview explicitly Use BuildSources.Directory instead of reporoot Add powershell use sbConfigPath Add variable group store publish variables Use spaces in name Change the AppStoreName locID Output the PDP and config file Temporarily disable signing Use AppStore Xpath Use namespace xml Use AppID Upload SBLog.txt on failure Try powershell private Remove AppID addition --- .pipelines/store/SBConfig.json | 6 ++- .pipelines/templates/channelSelection.yml | 2 +- .pipelines/templates/package-create-msix.yml | 39 ++++++++++++++------ 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.pipelines/store/SBConfig.json b/.pipelines/store/SBConfig.json index 002333cba1d..a52d60b045f 100644 --- a/.pipelines/store/SBConfig.json +++ b/.pipelines/store/SBConfig.json @@ -4,7 +4,9 @@ "packageParameters": { "PDPRootPath": "", "Release": "", - "PDPInclude": [], + "PDPInclude": [ + "PDP.xml" + ], "PDPExclude": [], "LanguageExclude": [ "default", @@ -21,7 +23,7 @@ }, "appSubmission": { "productId": "", - "targetPublishMode": "NotSet", + "targetPublishMode": "Immediate", "targetPublishDate": null, "visibility": "NotSet", "pricing": { diff --git a/.pipelines/templates/channelSelection.yml b/.pipelines/templates/channelSelection.yml index 0e352ef7558..3d1f445c559 100644 --- a/.pipelines/templates/channelSelection.yml +++ b/.pipelines/templates/channelSelection.yml @@ -1,7 +1,7 @@ steps: - pwsh: | # Determine LTS, Preview, or Stable - $metadata = Get-Content "$repoRoot/tools/metadata.json" -Raw | ConvertFrom-Json + $metadata = Get-Content "$(Build.SourcesDirectory)/PowerShell/tools/metadata.json" -Raw | ConvertFrom-Json $LTS = $metadata.LTSRelease.Latest $Stable = $metadata.StableRelease.Latest $isPreview = '$(OutputReleaseTag.releaseTag)' -match '-' diff --git a/.pipelines/templates/package-create-msix.yml b/.pipelines/templates/package-create-msix.yml index 37a66362119..37a35ccd55f 100644 --- a/.pipelines/templates/package-create-msix.yml +++ b/.pipelines/templates/package-create-msix.yml @@ -93,13 +93,13 @@ jobs: displayName: Create MsixBundle retryCountOnTaskFailure: 1 - - task: onebranch.pipeline.signing@1 - displayName: Sign MsixBundle - inputs: - command: 'sign' - signing_profile: $(MSIXProfile) - files_to_sign: '**/*.msixbundle' - search_root: '$(BundleDir)' + # - task: onebranch.pipeline.signing@1 + # displayName: Sign MsixBundle + # inputs: + # command: 'sign' + # signing_profile: $(MSIXProfile) + # files_to_sign: '**/*.msixbundle' + # search_root: '$(BundleDir)' - pwsh: | $signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File @@ -137,16 +137,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" } } @@ -171,16 +174,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 @@ -198,20 +206,21 @@ 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]$($config.SBConfigPath)" + Write-Host "##vso[task.setvariable variable=SBConfigPath]$($sbConfigPath)" name: UpdateConfigs displayName: Update PDPs and SBConfig.json - task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@3 displayName: 'Create StoreBroker Package' inputs: - serviceEndpoint: '$(ServiceConnection)' + serviceEndpoint: 'StoreAppPublish-Private' sbConfigPath: '$(SBConfigPath)' sourceFolder: '$(BundleDir)' contents: '*.msixBundle' @@ -219,6 +228,12 @@ jobs: 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" From 7cffedc768b944e9058ffcc7612327850f2e6335 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:43:49 -0500 Subject: [PATCH 02/16] Add crescan and tsa files in job --- .config/suppress.csk | 6 ++++++ .pipelines/templates/package-create-msix.yml | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 .config/suppress.csk diff --git a/.config/suppress.csk b/.config/suppress.csk new file mode 100644 index 00000000000..d51c3fea55c --- /dev/null +++ b/.config/suppress.csk @@ -0,0 +1,6 @@ +# CredScan suppression file +# Test certificate with private key +\\test\\tools\\Modules\\WebListener\\ClientCert.pfx +\\test\\tools\\Modules\\WebListener\\ServerCert.pfx +# Test certificate with private key and inline suppression isn't working +\\test\\powershell\\Modules\\Microsoft.PowerShell.Security\\certificateCommon.psm1 \ No newline at end of file diff --git a/.pipelines/templates/package-create-msix.yml b/.pipelines/templates/package-create-msix.yml index 37a35ccd55f..565108b741d 100644 --- a/.pipelines/templates/package-create-msix.yml +++ b/.pipelines/templates/package-create-msix.yml @@ -8,6 +8,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' From 66d98e6da035812361d5308e92d383e197a78e13 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:06:15 -0500 Subject: [PATCH 03/16] Convert ADO variables to booleans --- .config/suppress.csk | 6 ------ .pipelines/templates/release-MSIX-Publish.yml | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .config/suppress.csk diff --git a/.config/suppress.csk b/.config/suppress.csk deleted file mode 100644 index d51c3fea55c..00000000000 --- a/.config/suppress.csk +++ /dev/null @@ -1,6 +0,0 @@ -# CredScan suppression file -# Test certificate with private key -\\test\\tools\\Modules\\WebListener\\ClientCert.pfx -\\test\\tools\\Modules\\WebListener\\ServerCert.pfx -# Test certificate with private key and inline suppression isn't working -\\test\\powershell\\Modules\\Microsoft.PowerShell.Security\\certificateCommon.psm1 \ No newline at end of file diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 9a0dba8833f..245d756eeca 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -63,6 +63,11 @@ jobs: inputs: targetType: inline script: | + # Convert ADO variables to PowerShell boolean variables + $IsLTS = '$(LTS)' -eq 'true' + $IsStable = '$(STABLE)' -eq 'true' + $IsPreview = '$(PREVIEW)' -eq 'true' + Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(Stable), Preview: $(Preview)" # Define app configurations for each channel using secret variables From 37a45d0a019dcd335970d308823b35d3eac9d5c8 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:11:31 -0500 Subject: [PATCH 04/16] Declare variables separately --- .pipelines/templates/release-MSIX-Publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 245d756eeca..c43ae1d8410 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -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: From 667431b51a4d0c5ebf339a1d277bf02117046627 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:17:16 -0500 Subject: [PATCH 05/16] Use conditional tasks with hardcoded endpoints --- .pipelines/templates/release-MSIX-Publish.yml | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index c43ae1d8410..08123ea8074 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -22,8 +22,6 @@ jobs: - name: PREVIEW value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ] - template: ./variable/release-shared.yml@self - parameters: - RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ] steps: - task: PowerShell@2 inputs: @@ -71,25 +69,9 @@ jobs: $IsStable = '$(STABLE)' -eq 'true' $IsPreview = '$(PREVIEW)' -eq 'true' - Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(Stable), Preview: $(Preview)" + Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(STABLE), Preview: $(PREVIEW)" - # 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' - } - } - - # Determine the current channel + # Determine the current channel for logging purposes $currentChannel = if ($IsLTS) { 'LTS' } elseif ($IsStable) { 'Stable' } elseif ($IsPreview) { 'Preview' } @@ -98,23 +80,42 @@ jobs: exit 1 } - $config = $channelConfigs[$currentChannel] 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 LTS StoreBroker Package' - condition: ne('${{ parameters.skipMSIXPublish }}', 'true') + condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['LTS'], 'true')) + inputs: + serviceEndpoint: 'StoreAppPublish-Stable' + appId: '$(AppID-LTS)' + 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 Stable StoreBroker Package' + condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['STABLE'], 'true')) + inputs: + serviceEndpoint: 'StoreAppPublish-Stable' + 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: '$(SelectedServiceEndpoint)' - appId: '$(SelectedAppId)' + serviceEndpoint: 'StoreAppPublish-Preview' + appId: '$(AppID-Preview)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip' From 1656992a0806ff83b60536fe0b293f33c1996c54 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 6 Oct 2025 11:57:03 -0700 Subject: [PATCH 06/16] Add Start-PSBootstrap to add installed dotnet to path --- .pipelines/templates/release-validate-globaltools.yml | 3 +++ .pipelines/templates/release-validate-sdk.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.pipelines/templates/release-validate-globaltools.yml b/.pipelines/templates/release-validate-globaltools.yml index 4a7d23c8b4b..083c98c3930 100644 --- a/.pipelines/templates/release-validate-globaltools.yml +++ b/.pipelines/templates/release-validate-globaltools.yml @@ -43,6 +43,9 @@ jobs: - pwsh: | $repoRoot = "$(Build.SourcesDirectory)/PowerShell" + Import-Module "$repoRoot/build.psm1" -Force -Verbose + Start-PSBootstrap -Scenario Dotnet + $toolPath = New-Item -ItemType Directory "$(System.DefaultWorkingDirectory)/toolPath" | Select-Object -ExpandProperty FullName Write-Verbose -Verbose "dotnet tool list -g" diff --git a/.pipelines/templates/release-validate-sdk.yml b/.pipelines/templates/release-validate-sdk.yml index 4089d54e51b..3b0442f65d6 100644 --- a/.pipelines/templates/release-validate-sdk.yml +++ b/.pipelines/templates/release-validate-sdk.yml @@ -51,6 +51,9 @@ jobs: - pwsh: | $repoRoot = "$(Build.SourcesDirectory)" + Import-Module "$repoRoot/build.psm1" -Force -Verbose + Start-PSBootstrap -Scenario Dotnet + $env:DOTNET_NOLOGO=1 $localLocation = "$(Pipeline.Workspace)/PSPackagesOfficial/drop_nupkg_build_nupkg" From 06cf3b945f7c85dc45bad73fe0f114f5017dc8c2 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 7 Oct 2025 19:50:42 +0000 Subject: [PATCH 07/16] Merged PR 37066: Update the test image for SDK tests Update the test image for SDK tests ---- #### AI description (iteration 1) #### PR Classification This PR is a configuration update aimed at improving SDK test reliability by using an updated Ubuntu test image. #### PR Summary The pull request updates the pipeline configuration to reference a new test image version for SDK validation. - `.pipelines/PowerShell-Release-Official.yml`: Changed `imageName` from `PSMMSUbuntu20.04-Secure` to `PSMMSUbuntu22.04-Secure`. --- .pipelines/PowerShell-Release-Official.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/PowerShell-Release-Official.yml b/.pipelines/PowerShell-Release-Official.yml index 36bee13a0c7..c54fc99a0b7 100644 --- a/.pipelines/PowerShell-Release-Official.yml +++ b/.pipelines/PowerShell-Release-Official.yml @@ -156,7 +156,7 @@ extends: parameters: jobName: "LinuxSDK" displayName: "Linux SDK Validation" - imageName: PSMMSUbuntu20.04-Secure + imageName: PSMMSUbuntu22.04-Secure poolName: $(ubuntuPool) - stage: gbltool From 1ae6347e33bcb8678458e97df353c7a7d2539cd9 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 7 Oct 2025 13:16:06 -0700 Subject: [PATCH 08/16] Add bootstrap to global tool validation step --- .pipelines/templates/release-validate-globaltools.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pipelines/templates/release-validate-globaltools.yml b/.pipelines/templates/release-validate-globaltools.yml index 083c98c3930..8c2031d5cc9 100644 --- a/.pipelines/templates/release-validate-globaltools.yml +++ b/.pipelines/templates/release-validate-globaltools.yml @@ -78,6 +78,9 @@ jobs: - pwsh: | $repoRoot = "$(Build.SourcesDirectory)/PowerShell" + Import-Module "$repoRoot/build.psm1" -Force -Verbose + Start-PSBootstrap -Scenario Dotnet + $exeName = if ($IsWindows) { "pwsh.exe" } else { "pwsh" } $toolPath = "$(System.DefaultWorkingDirectory)/toolPath/${{ parameters.globalToolExeName }}" From 99e6679a8c321fe7703ed6799d541b972fea0a19 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:51:44 -0500 Subject: [PATCH 09/16] Make MSIX publish stage dependent on SetReleaseTagandContainerName stage --- .pipelines/PowerShell-Release-Official.yml | 4 +++- .pipelines/templates/release-MSIX-Publish.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pipelines/PowerShell-Release-Official.yml b/.pipelines/PowerShell-Release-Official.yml index c54fc99a0b7..a2f73c20bdc 100644 --- a/.pipelines/PowerShell-Release-Official.yml +++ b/.pipelines/PowerShell-Release-Official.yml @@ -365,7 +365,9 @@ extends: This is typically done by the community 1-2 days after the release. - stage: PublishMsix - dependsOn: PushGitTagAndMakeDraftPublic + dependsOn: + - setReleaseTagAndChangelog + - PushGitTagAndMakeDraftPublic displayName: Publish MSIX to store variables: ob_release_environment: Production diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 08123ea8074..dc924fdeef7 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -22,6 +22,8 @@ jobs: - name: PREVIEW value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ] - template: ./variable/release-shared.yml@self + parameters: + RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ] steps: - task: PowerShell@2 inputs: From 439120acda4171e9f9699cdb5e66517d83566ac7 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:55:17 -0500 Subject: [PATCH 10/16] Toggle release environment with officialness in msix stag --- .pipelines/PowerShell-Release-Official.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/PowerShell-Release-Official.yml b/.pipelines/PowerShell-Release-Official.yml index a2f73c20bdc..ca6b79335dd 100644 --- a/.pipelines/PowerShell-Release-Official.yml +++ b/.pipelines/PowerShell-Release-Official.yml @@ -370,7 +370,7 @@ extends: - PushGitTagAndMakeDraftPublic displayName: Publish MSIX to store variables: - ob_release_environment: Production + ob_release_environment: ${{ variables.releaseEnvironment }} jobs: - template: /.pipelines/templates/release-MSIX-Publish.yml@self parameters: From 9fc260ca3bce8432b4500a593a6cc3dcef759639 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:14:48 -0500 Subject: [PATCH 11/16] Use PowerShell-Private service connection --- .pipelines/templates/release-MSIX-Publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index dc924fdeef7..c691ca5819a 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -116,7 +116,7 @@ jobs: displayName: 'Publish Preview StoreBroker Package' condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['PREVIEW'], 'true')) inputs: - serviceEndpoint: 'StoreAppPublish-Preview' + serviceEndpoint: 'StoreAppPublish-Private' appId: '$(AppID-Preview)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' From b89fe9b23ffeb585bb122f3d4f7e96887bbfbcac Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:59:46 -0500 Subject: [PATCH 12/16] Upload error log to artifacts --- .pipelines/templates/release-MSIX-Publish.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index c691ca5819a..2faacb2367e 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -124,3 +124,9 @@ jobs: numberOfPackagesToKeep: 2 jsonZipUpdateMetadata: true targetPublishMode: 'Immediate' + + - pwsh: | + Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue | + Copy-Item -Destination "$(ob_outputDirectory)" -Verbose + displayName: Upload Store Failure Log + condition: failed() From 82d4bf9795a4fb71fbc698a1d8d7ec38a34a6423 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:27:29 -0500 Subject: [PATCH 13/16] Create artifact directory --- .pipelines/templates/release-MSIX-Publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 2faacb2367e..144ecfbd912 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -126,6 +126,11 @@ jobs: targetPublishMode: 'Immediate' - pwsh: | + #Create output directory if it doesn't exist + if (-not (Test-Path -Path "$(ob_outputDirectory)")) { + New-Item -ItemType Directory -Path "$(ob_outputDirectory)" -Force + } + Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue | Copy-Item -Destination "$(ob_outputDirectory)" -Verbose displayName: Upload Store Failure Log From a780f5fe771025ebdab03fe6d9a562a6225582e1 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:41:52 -0500 Subject: [PATCH 14/16] Output the error log instead --- .pipelines/templates/release-MSIX-Publish.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 144ecfbd912..100f8750a75 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -126,12 +126,6 @@ jobs: targetPublishMode: 'Immediate' - pwsh: | - #Create output directory if it doesn't exist - if (-not (Test-Path -Path "$(ob_outputDirectory)")) { - New-Item -ItemType Directory -Path "$(ob_outputDirectory)" -Force - } - - Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue | - Copy-Item -Destination "$(ob_outputDirectory)" -Verbose + Get-Content -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue displayName: Upload Store Failure Log condition: failed() From ffadaa5f4904a39508b351768a57ec59d9cf1c12 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:31:53 -0500 Subject: [PATCH 15/16] Fix changelog link generation for git tag and store --- .pipelines/templates/release-MSIX-Publish.yml | 8 ++++---- .pipelines/templates/release-githubNuget.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 100f8750a75..4d3e0cb41c8 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -43,14 +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\.]','' + $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" @@ -90,7 +90,7 @@ jobs: displayName: 'Publish LTS StoreBroker Package' condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['LTS'], 'true')) inputs: - serviceEndpoint: 'StoreAppPublish-Stable' + serviceEndpoint: 'StoreAppPublish-Private' appId: '$(AppID-LTS)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' @@ -103,7 +103,7 @@ jobs: displayName: 'Publish Stable StoreBroker Package' condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['STABLE'], 'true')) inputs: - serviceEndpoint: 'StoreAppPublish-Stable' + serviceEndpoint: 'StoreAppPublish-Private' appId: '$(AppID-Stable)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' diff --git a/.pipelines/templates/release-githubNuget.yml b/.pipelines/templates/release-githubNuget.yml index a8a874619a4..5f67ce6a9e4 100644 --- a/.pipelines/templates/release-githubNuget.yml +++ b/.pipelines/templates/release-githubNuget.yml @@ -121,13 +121,13 @@ jobs: $middleURL = '' $tagString = "$(ReleaseTag)" Write-Verbose -Verbose "Use the following command to push the tag:" - if ($tagString -match '-') { + if ($tagString -match '-preview') { $middleURL = "preview" } elseif ($tagString -match '(\d+\.\d+)') { $middleURL = $matches[1] } - $endURL = $tagString -replace '[v\.]','' + $endURL = $tagString -replace '^v|\.', '' $message = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL" Write-Verbose -Verbose "git tag -a $(ReleaseTag) $env:BUILD_SOURCEVERSION -m $message" displayName: Git Push Tag Command From 4ebc1ff640813d695bfe84c95c021701df6efd1a Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:43:50 -0500 Subject: [PATCH 16/16] Reenable MSIX signing --- .pipelines/templates/package-create-msix.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pipelines/templates/package-create-msix.yml b/.pipelines/templates/package-create-msix.yml index 565108b741d..31621698f23 100644 --- a/.pipelines/templates/package-create-msix.yml +++ b/.pipelines/templates/package-create-msix.yml @@ -97,13 +97,13 @@ jobs: displayName: Create MsixBundle retryCountOnTaskFailure: 1 - # - task: onebranch.pipeline.signing@1 - # displayName: Sign MsixBundle - # inputs: - # command: 'sign' - # signing_profile: $(MSIXProfile) - # files_to_sign: '**/*.msixbundle' - # search_root: '$(BundleDir)' + - task: onebranch.pipeline.signing@1 + displayName: Sign MsixBundle + inputs: + command: 'sign' + signing_profile: $(MSIXProfile) + files_to_sign: '**/*.msixbundle' + search_root: '$(BundleDir)' - pwsh: | $signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File