[release/v7.4.20] Use .NET SDK and NuGet feed early access for build, package and release pipelines - #27910
Merged
Aditya Patwardhan (adityapatwardhan) merged 2 commits intoSep 1, 2026
Conversation
…se pipelines (PowerShell#27795) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Aditya Patwardhan (adityapatwardhan)
requested a review
from a team
as a code owner
August 31, 2026 22:09
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Aditya Patwardhan (adityapatwardhan)
August 31, 2026 22:09
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Backport to release/v7.4.20 that adds “early access” .NET SDK/runtime + NuGet feed selection to the build/packaging/release Azure Pipelines, including a new download stage for private SDK artifacts and feed credential setup.
Changes:
- Adds queue-time parameters/variables to drive early-access mode (feed + SDK/runtime versions) across official and non-official pipelines.
- Introduces a new download job/template for early-access dotnet SDK archives and extends
install-dotnet.ymlto install from the downloaded artifact when early-access is enabled. - Extends
build.psm1NuGet config switching to support anEarlyAccesssource and adds a helper to download early-access dotnet payloads.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| build.psm1 | Adds EarlyAccess support to Switch-PSNugetConfig and introduces Get-DotnetEarlyAccess. |
| .pipelines/templates/windows-hosted-build.yml | Passes explicit dotnet RID/arch into dotnet install template. |
| .pipelines/templates/variables/PowerShell-Packages-Variables.yml | Adds early-access parameters and exports EARLY_ACCESS_FEED / IsEarlyAccess variables. |
| .pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml | Adds early-access parameters and exports EARLY_ACCESS_FEED / IsEarlyAccess variables. |
| .pipelines/templates/testartifacts.yml | Ensures dotnet install template is called with explicit architecture. |
| .pipelines/templates/stages/PowerShell-Release-Stages.yml | Adds a stage to download early-access dotnet and wires dependencies/parameters through validation stages. |
| .pipelines/templates/stages/PowerShell-Packages-Stages.yml | Adds an “Early .NET Setup” stage and makes package stages depend on it. |
| .pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml | Propagates early-access flags and sets dotnet architecture where needed. |
| .pipelines/templates/release-validate-sdk.yml | Adds early-access parameters/variables and adjusts dotnet + feed setup for SDK validation. |
| .pipelines/templates/release-validate-globaltools.yml | Adds early-access parameters and passes explicit dotnet architecture to install template. |
| .pipelines/templates/release-validate-fxdpackages.yml | Adds early-access parameters and passes explicit dotnet architecture to install template. |
| .pipelines/templates/packaging/windows/package.yml | Threads dotnet architecture into install template for packaging jobs. |
| .pipelines/templates/mac.yml | Threads dotnet architecture into install template for mac builds. |
| .pipelines/templates/linux.yml | Threads dotnet architecture into install template for linux builds. |
| .pipelines/templates/linux-package-build.yml | Threads dotnet architecture into install template for linux packaging. |
| .pipelines/templates/install-dotnet.yml | Adds early-access install path (download artifact + extract) and architecture parameterization. |
| .pipelines/templates/insert-nuget-config-azfeed.yml | Switches NuGet config based on early-access mode and configures credential provider token for early-access feeds. |
| .pipelines/templates/downloadDotnetEarlyAccess.yml | New job to download early-access dotnet SDK archives from private storage and publish them as a pipeline artifact. |
| .pipelines/PowerShell-Release-Official.yml | Adds early-access parameters and passes them into the release stages template. |
| .pipelines/PowerShell-Packages-Official.yml | Adds early-access parameters and passes them into the packages stages template. |
| .pipelines/PowerShell-Coordinated_Packages-Official.yml | Adds early-access parameters and passes them into the coordinated packages stages template. |
| .pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml | Adds early-access parameters and passes them into the non-official release stages template. |
| .pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml | Adds early-access parameters and passes them into the non-official packages stages template. |
| .pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml | Adds early-access parameters and passes them into the non-official coordinated packages stages template. |
Suppressed comments (1)
.pipelines/templates/install-dotnet.yml:98
- The early-access install step uses
condition: eq(variables['ISEARLYACCESS'], 'true'). IfISEARLYACCESSis'True', neither the normal install step nor this early-access step will run, leaving the job without a dotnet SDK.
condition: eq(variables['ISEARLYACCESS'], 'true')
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| displayName: "Download dotnet-packages artifact" | ||
| condition: eq(variables['ISEARLYACCESS'], 'true') |
| Write-Verbose -Verbose "Getting an Azure DevOps access token" | ||
| # Microsoft's well-known Entra resource ID for the Azure DevOps token audience. | ||
| $azureDevOpsResourceUrl = '499b84ac-1321-427f-aa17-267ca6975798' | ||
| $azt = (Get-AzAccessToken -ResourceUrl $azureDevOpsResourceUrl).Token | ConvertFrom-SecureString -AsPlainText |
| Write-Verbose -Verbose "EARLY_ACCESS_FEED_URL is not set" | ||
| } | ||
| displayName: 'Setup Azure Artifacts Credential Provider secret' | ||
| condition: eq(variables['ISEARLYACCESS'], 'true') |
Comment on lines
+2568
to
+2586
| [ValidateSet('win-x64', 'win-x86', 'win-arm64', 'linux-x64', 'linux-arm64', 'linux-alpine-x64', 'linux-alpine-arm64', 'osx-x64', 'osx-arm64', 'all')] | ||
| [string]$Architecture, | ||
|
|
||
| [Parameter(Mandatory)] | ||
| [string]$DOTNET_PRIVATE_SAS | ||
| ) | ||
|
|
||
| $baseUrl = $env:DOTNET_PRIVATE_BLOB_BASE_URL | ||
| $DOTNET_RUNTIME_VERSION = $env:DOTNET_RUNTIME_VERSION | ||
| $DOTNET_SDK_VERSION = $env:DOTNET_SDK_VERSION | ||
|
|
||
| $fileName = switch ($Architecture) { | ||
| 'win-x64' { "dotnet-sdk-$DOTNET_SDK_VERSION-win-x64.zip" } | ||
| 'win-x86' { "dotnet-sdk-$DOTNET_SDK_VERSION-win-x86.zip" } | ||
| 'win-arm64' { "dotnet-sdk-$DOTNET_SDK_VERSION-win-arm64.zip" } | ||
| 'linux-x64' { "dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz" } | ||
| 'linux-arm64' { "dotnet-sdk-$DOTNET_SDK_VERSION-linux-arm64.tar.gz" } | ||
| 'linux-alpine-x64' { "dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz" } | ||
| 'linux-alpine-arm64' { "dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-arm64.tar.gz" } |
Patrick Meinecke (SeeminglyScience)
approved these changes
Sep 1, 2026
Aditya Patwardhan (adityapatwardhan)
merged commit Sep 1, 2026
a59b047
into
PowerShell:release/v7.4.20
40 checks passed
Aditya Patwardhan (adityapatwardhan)
deleted the
backport/release/v7.4.20/27795-9f7470700
branch
September 1, 2026 01:11
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #27795 to release/v7.4.20
Triggered by Aditya Patwardhan (@adityapatwardhan) on behalf of Aditya Patwardhan (@adityapatwardhan)
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Adds the early-access .NET SDK/runtime and NuGet feed controls required by the PowerShell 7.4 build, package, and release pipelines, including authenticated feed setup and propagation through shared templates.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Cherry-picked cleanly onto release/v7.4.20. Parsed all 23 changed YAML files successfully with PyYAML, validated build.psm1 with the PowerShell parser (no syntax errors or conflict markers), and ran git diff --check successfully. Removed two trailing blank EOF lines found by the initial whitespace check and reran validation with a clean worktree.
Risk
REQUIRED: Check exactly one box.
High risk because the change spans shared official and non-official build, package, and release pipelines across Windows, Linux, and macOS and changes SDK/runtime acquisition plus authenticated NuGet feed behavior. Risk is reduced by the clean cherry-pick, syntax validation of every changed YAML file and build.psm1, and a clean whitespace check.