From 3d4293911efc15769a547326c6c4df5005412ca6 Mon Sep 17 00:00:00 2001 From: anamnavi Date: Mon, 2 Nov 2026 10:44:43 -0500 Subject: [PATCH 1/6] Add stage to publish Microsoft.PowerShell.PSResourceGet to Pwsh CFS feed --- .pipelines/PSResourceGet-Official.yml | 60 +++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/.pipelines/PSResourceGet-Official.yml b/.pipelines/PSResourceGet-Official.yml index b45fa9c68..0f56699b9 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -10,8 +10,16 @@ parameters: # parameters are shown up in ADO UI in a build queue time displayName: 'Enable debug output' type: boolean default: false -- name: 'onlyPublishToCFSFeed' - displayName: 'Only publish to ADO CFS feed (i.e excludes PSGallery)' +- name: 'releaseMARModulesCFS' + displayName: 'Publish to MAR module CFS feed' + type: boolean + default: false +- name: 'releasePowerShellModuleCFS' + displayName: 'Publish to PowerShell module CFS feed' + type: boolean + default: false +- name: 'releasePSGallery' + displayName: 'Publish to PSGallery' type: boolean default: false @@ -291,9 +299,10 @@ extends: Get-ChildItem "$(ob_outputDirectory)" -Recurse displayName: Find Signed Nupkg - - stage: releaseCFS + - stage: releaseMARModulesCFS displayName: 'Publish Package to CFS feed (msazure)' dependsOn: stagebuild + condition: and(succeeded(), ${{ eq(parameters.releaseMARModulesCFS, true) }}) jobs: - job: validation displayName: Publish to CFS feed @@ -337,10 +346,53 @@ extends: dotnet nuget push $publishNupkgPath --source $adoRepoUri --api-key az --skip-duplicate displayName: 'Push package to external Azure Artifacts feed' + - stage: releasePowerShellModuleCFS + displayName: 'Publish Package to PowerShell modules CFS feed' + dependsOn: stagebuild + condition: and(succeeded(), ${{ eq(parameters.releasePowerShellModuleCFS, true) }}) + jobs: + - job: releaseCFSJob + displayName: Publish to CFS feed + variables: + - name: ob_outputDirectory + value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT' + pool: + type: windows + steps: + - task: DownloadPipelineArtifact@2 + inputs: + targetPath: '$(Pipeline.Workspace)' + artifact: drop_stagebuild_nupkg + displayName: 'Download drop_stagebuild_nupkg artifact that has .nupkg file needed' + - pwsh: | + Get-ChildItem '$(Pipeline.Workspace)' -Recurse | Out-String -Stream | write-Verbose -Verbose + displayName: 'Capture Workspace' + - pwsh: | + $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\drop_stagebuild_nupkg\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 + $pkgFound = Test-Path $publishNupkg + Write-Verbose -Verbose "pkg found: $pkgFound" + displayName: 'Verify downloaded .nupkg is present' + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to external Azure Artifacts feed' + inputs: + azureDevOpsServiceConnection: 'mscodehub-PushToPSRelFeed-ADO' + feedUrl: 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json' + - pwsh: | + $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\drop_stagebuild_nupkg\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 + if (-not $publishNupkg) + { + throw "No nupkg found under $(Pipeline.Workspace) matching Microsoft.PowerShell.PSResourceGet.*.nupkg" + } + $publishNupkgPath = $publishNupkg.FullName + Write-Verbose -Verbose "Package found at path: $publishNupkgPath" + $adoRepoUri = "https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json" + dotnet nuget push $publishNupkgPath --source $adoRepoUri --api-key az --skip-duplicate + displayName: 'Push package to external Azure Artifacts feed' + - stage: release displayName: Release PSResourceGet dependsOn: stagebuild - condition: and(succeeded(), not(${{ parameters.onlyPublishToCFSFeed }})) + condition: and(succeeded(), ${{ eq(parameters.releasePSGallery, true) }}) variables: version: $[ stageDependencies.build.main.outputs['package.version'] ] drop: $(Pipeline.Workspace)/drop_stagebuild_nupkg From 10367de104a7e3622333cf477fefd238b89eb152 Mon Sep 17 00:00:00 2001 From: anamnavi Date: Mon, 2 Nov 2026 10:48:33 -0500 Subject: [PATCH 2/6] Update psd1 version for test CFS publish --- src/Microsoft.PowerShell.PSResourceGet.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.PSResourceGet.psd1 b/src/Microsoft.PowerShell.PSResourceGet.psd1 index eec729108..becd24b53 100644 --- a/src/Microsoft.PowerShell.PSResourceGet.psd1 +++ b/src/Microsoft.PowerShell.PSResourceGet.psd1 @@ -4,7 +4,7 @@ @{ RootModule = './Microsoft.PowerShell.PSResourceGet.dll' NestedModules = @('./Microsoft.PowerShell.PSResourceGet.psm1') - ModuleVersion = '1.3.0' + ModuleVersion = '0.2.9' CompatiblePSEditions = @('Core', 'Desktop') GUID = 'e4e0bda1-0703-44a5-b70d-8fe704cd0643' Author = 'Microsoft Corporation' From bf52dabb3785abee5d5ad34fefb642748592fd04 Mon Sep 17 00:00:00 2001 From: Anam Navied Date: Mon, 2 Nov 2026 18:48:53 +0000 Subject: [PATCH 3/6] Merged PR 42511: Fix path in retrieving downloaded nupkg step Fix path in retrieving downloaded nupkg step ---- #### AI description (iteration 1) #### PR Classification Bug fix: corrects an incorrect file path used when retrieving the downloaded nupkg artifact in the build pipeline. #### PR Summary Fixes the pipeline path used to locate the downloaded nupkg by removing an incorrect extra directory segment. - `.pipelines/PSResourceGet-Official.yml`: Updated path from `$(Pipeline.Workspace)\drop_stagebuild_nupkg\PSResourceGet\signed\...` to `$(Pipeline.Workspace)\PSResourceGet\signed\...` in both the "Verify downloaded .nupkg is present" and nupkg publishing steps. --- .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 0f56699b9..af2702577 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -368,7 +368,7 @@ extends: Get-ChildItem '$(Pipeline.Workspace)' -Recurse | Out-String -Stream | write-Verbose -Verbose displayName: 'Capture Workspace' - pwsh: | - $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\drop_stagebuild_nupkg\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 + $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 $pkgFound = Test-Path $publishNupkg Write-Verbose -Verbose "pkg found: $pkgFound" displayName: 'Verify downloaded .nupkg is present' @@ -378,7 +378,7 @@ extends: azureDevOpsServiceConnection: 'mscodehub-PushToPSRelFeed-ADO' feedUrl: 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json' - pwsh: | - $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\drop_stagebuild_nupkg\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 + $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 if (-not $publishNupkg) { throw "No nupkg found under $(Pipeline.Workspace) matching Microsoft.PowerShell.PSResourceGet.*.nupkg" From 0477c0ecd04e99b390a7999a5a90b7951af4843e Mon Sep 17 00:00:00 2001 From: anamnavi Date: Mon, 2 Nov 2026 14:01:03 -0500 Subject: [PATCH 4/6] revert version change --- src/Microsoft.PowerShell.PSResourceGet.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.PSResourceGet.psd1 b/src/Microsoft.PowerShell.PSResourceGet.psd1 index becd24b53..eec729108 100644 --- a/src/Microsoft.PowerShell.PSResourceGet.psd1 +++ b/src/Microsoft.PowerShell.PSResourceGet.psd1 @@ -4,7 +4,7 @@ @{ RootModule = './Microsoft.PowerShell.PSResourceGet.dll' NestedModules = @('./Microsoft.PowerShell.PSResourceGet.psm1') - ModuleVersion = '0.2.9' + ModuleVersion = '1.3.0' CompatiblePSEditions = @('Core', 'Desktop') GUID = 'e4e0bda1-0703-44a5-b70d-8fe704cd0643' Author = 'Microsoft Corporation' From a483228b0c85c6670f80cdfa99ea4537387cd8d8 Mon Sep 17 00:00:00 2001 From: anamnavi Date: Mon, 2 Nov 2026 15:55:00 -0500 Subject: [PATCH 5/6] Add task to install dotnet sdk version specified in global.json --- .pipelines/PSResourceGet-Official.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pipelines/PSResourceGet-Official.yml b/.pipelines/PSResourceGet-Official.yml index af2702577..f8e0e6589 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -377,6 +377,11 @@ extends: inputs: azureDevOpsServiceConnection: 'mscodehub-PushToPSRelFeed-ADO' feedUrl: 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json' + - task: UseDotNet@2 + inputs: + packageType: 'sdk' + useGlobalJson: true + displayName: 'Install .NET SDK' - pwsh: | $publishNupkg = Get-ChildItem -Path '$(Pipeline.Workspace)\PSResourceGet\signed\PublishedNupkg\Microsoft.PowerShell.PSResourceGet.*.nupkg' -Recurse -File | Select-Object -First 1 if (-not $publishNupkg) From 224a9c1ce0d620c4f551b535a62cef1fd23ef353 Mon Sep 17 00:00:00 2001 From: anamnavi Date: Mon, 2 Nov 2026 15:59:37 -0500 Subject: [PATCH 6/6] Increase timeout for relasing to PSGallery stage --- .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 f8e0e6589..9e24395ee 100644 --- a/.pipelines/PSResourceGet-Official.yml +++ b/.pipelines/PSResourceGet-Official.yml @@ -408,13 +408,13 @@ extends: displayName: Manual validation pool: type: server - timeoutInMinutes: 1440 + timeoutInMinutes: 14400 steps: - task: ManualValidation@0 displayName: Wait 24 hours for validation inputs: instructions: Please validate the release - timeoutInMinutes: 1440 + timeoutInMinutes: 14400 - job: PSGalleryPublish displayName: Publish to PSGallery