From 3da2692886b48a37194e7467e7f1594d938881b5 Mon Sep 17 00:00:00 2001 From: Anam Navied Date: Wed, 11 Mar 2026 16:13:03 -0400 Subject: [PATCH 1/3] Revert "Merged PR 38916: Add ob_restore_phase to steps in packaging job" This reverts commit 4558c310d0bb60d4ff8b79cabe06ef72b0354e69. --- .pipelines/PSResourceGet-Official.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.pipelines/PSResourceGet-Official.yml b/.pipelines/PSResourceGet-Official.yml index e4ea3ba1e..8558e7d9a 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -209,8 +209,6 @@ extends: type: windows steps: - checkout: self - env: - ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step. - pwsh: | if (-not (Test-Path $(repoRoot)/.config/tsaoptions.json)) { @@ -218,24 +216,18 @@ extends: throw "tsaoptions.json does not exist under $(repoRoot)/.config" } displayName: Test if tsaoptions.json exists - env: - ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step. - task: DownloadPipelineArtifact@2 displayName: 'Download build files' inputs: targetPath: $(signOutPath) artifact: drop_stagebuild_jobbuild - env: - ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step. - pwsh: | Set-Location "$(signOutPath)" Write-Host "Contents of signOutPath:" Get-ChildItem $(signOutPath) -Recurse displayName: Capture artifacts directory structure - env: - ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step. - pwsh: | # This need to be done before set-location so the module from PSHome is loaded @@ -250,16 +242,12 @@ extends: Publish-PSResource -Path "$(signOutPath)\Microsoft.PowerShell.PSResourceGet" -Repository 'localRepo' -Verbose Write-Output "##vso[task.setvariable variable=publishPath]$publishPath" displayName: Create nupkg for publishing - env: - ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step. - pwsh: | Set-Location '$(publishPath)' Write-Host "Contents of signOutPath:" Get-ChildItem '$(publishPath)' -Recurse displayName: Find Nupkg Pre Signing - env: - ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step. - task: onebranch.pipeline.signing@1 displayName: Sign nupkg From 3e201b04273f180754874949955bcea46433a7ff Mon Sep 17 00:00:00 2001 From: Anam Navied Date: Wed, 11 Mar 2026 16:13:03 -0400 Subject: [PATCH 2/3] Revert "Merged PR 38901: Remove isOutput on variable being set and update publishPath var reference" This reverts commit be743d53997cf508af09a22f0c291c3f140389f7. --- .pipelines/PSResourceGet-Official.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/PSResourceGet-Official.yml b/.pipelines/PSResourceGet-Official.yml index 8558e7d9a..9728e5b8a 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -240,7 +240,7 @@ extends: Register-PSResourceRepository -Name 'localRepo' -Uri $publishPath Publish-PSResource -Path "$(signOutPath)\Microsoft.PowerShell.PSResourceGet" -Repository 'localRepo' -Verbose - Write-Output "##vso[task.setvariable variable=publishPath]$publishPath" + Write-Output "##vso[task.setvariable variable=publishPath;isOutput=true]$publishPath" displayName: Create nupkg for publishing - pwsh: | @@ -266,7 +266,7 @@ extends: - task: CopyFiles@2 displayName: "Copy nupkg to ob_outputDirectory - '$(ob_outputDirectory)'" inputs: - Contents: $(publishPath)\Microsoft.PowerShell.PSResourceGet.*.nupkg + Contents: $(signOutPath)\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg TargetFolder: $(ob_outputDirectory) - pwsh: | From 748446c863856eae310a4434a2180208046210e6 Mon Sep 17 00:00:00 2001 From: Anam Navied Date: Wed, 11 Mar 2026 16:13:03 -0400 Subject: [PATCH 3/3] Revert "Merged PR 38899: Fix signing for .nupkg" This reverts commit c8904281051651e27a827079fce9483b8fea3d76. --- .pipelines/PSResourceGet-Official.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.pipelines/PSResourceGet-Official.yml b/.pipelines/PSResourceGet-Official.yml index 9728e5b8a..a44d53651 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -234,34 +234,25 @@ extends: Import-Module -Name Microsoft.PowerShell.PSResourceGet -Force Set-Location "$(signOutPath)\Microsoft.PowerShell.PSResourceGet" - $publishPath = Join-Path $(signOutPath) -ChildPath 'PublishedNupkg' + $null = New-Item -ItemType Directory -Path "$(signOutPath)\PublishedNupkg" -Force - $null = New-Item -ItemType Directory -Path $publishPath -Force - - Register-PSResourceRepository -Name 'localRepo' -Uri $publishPath + Register-PSResourceRepository -Name 'localRepo' -Uri "$(signOutPath)\PublishedNupkg" Publish-PSResource -Path "$(signOutPath)\Microsoft.PowerShell.PSResourceGet" -Repository 'localRepo' -Verbose - Write-Output "##vso[task.setvariable variable=publishPath;isOutput=true]$publishPath" displayName: Create nupkg for publishing - - pwsh: | - Set-Location '$(publishPath)' - Write-Host "Contents of signOutPath:" - Get-ChildItem '$(publishPath)' -Recurse - displayName: Find Nupkg Pre Signing - - task: onebranch.pipeline.signing@1 displayName: Sign nupkg inputs: command: 'sign' signing_profile: external_distribution files_to_sign: '**\*.nupkg' - search_root: '$(publishPath)' + search_root: "$(signOutPath)\PublishedNupkg" - pwsh: | - Set-Location '$(publishPath)' + Set-Location "$(signOutPath)\PublishedNupkg" Write-Host "Contents of signOutPath:" - Get-ChildItem '$(publishPath)' -Recurse - displayName: Find Nupkg Post Signing + Get-ChildItem "$(signOutPath)" -Recurse + displayName: Find Nupkg - task: CopyFiles@2 displayName: "Copy nupkg to ob_outputDirectory - '$(ob_outputDirectory)'"