Skip to content

[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 into
PowerShell:release/v7.4.20from
adityapatwardhan:backport/release/v7.4.20/27795-9f7470700
Sep 1, 2026
Merged

Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:release/v7.4.20from
adityapatwardhan:backport/release/v7.4.20/27795-9f7470700

Conversation

@adityapatwardhan

Copy link
Copy Markdown
Member

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

  • Required tooling change
  • Optional tooling change (include reasoning)

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

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

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
  • Medium
  • Low

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.

…se pipelines (PowerShell#27795)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 31, 2026 22:09
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Aug 31, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to install from the downloaded artifact when early-access is enabled.
  • Extends build.psm1 NuGet config switching to support an EarlyAccess source 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'). If ISEARLYACCESS is '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 thread build.psm1
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" }
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit a59b047 into PowerShell:release/v7.4.20 Sep 1, 2026
40 checks passed
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) deleted the backport/release/v7.4.20/27795-9f7470700 branch September 1, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants