Skip to content

[release/v7.6.5] Use .NET SDK and NuGet feed early access for build, package and release pipelines - #27806

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:release/v7.6.5from
adityapatwardhan:backport/release/v7.6.5/27795-9f7470700
Aug 10, 2026
Merged

[release/v7.6.5] Use .NET SDK and NuGet feed early access for build, package and release pipelines#27806
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:release/v7.6.5from
adityapatwardhan:backport/release/v7.6.5/27795-9f7470700

Conversation

@adityapatwardhan

Copy link
Copy Markdown
Member

Backport of #27795 to release/v7.6.5

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)

Enables the PowerShell build, package, and release pipelines to consume approved early access .NET SDK/runtime artifacts and NuGet feeds for release/v7.6.5.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Cherry-picked the current authoritative merge commit onto the latest upstream release/v7.6.5 without conflicts. Verified the committed target-to-HEAD diff with git diff --check, confirmed a clean worktree, and validated build.psm1 PowerShell syntax with no errors or conflict markers. Two inherited blank EOF lines in official pipeline YAML files were removed before amending the backport commit. Full pipeline behavior will be validated by required PR CI.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

High risk because this changes shared build, package, and release pipeline templates and credential/feed handling across Windows, Linux, and macOS. The backport is limited to the approved original change, applied cleanly, and is subject to required CI before merge.

…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 10, 2026 20:41
@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 10, 2026
@azure-pipelines

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

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.

LGTM!

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.6.5 that adds “early access” .NET SDK/runtime and NuGet feed support across build, packaging, and release Azure Pipelines, allowing controlled consumption of pre-release .NET artifacts.

Changes:

  • Adds an early-access download job/stage and a shared template to fetch/upload early-access .NET SDK archives for multiple OS/architectures.
  • Extends the install-dotnet.yml and NuGet config templates to install from the downloaded artifacts and switch to early-access feeds/credentials when enabled.
  • Propagates new queue-time parameters/variables (IsEarlyAccess, EarlyAccessFeed, DOTNET_*_VERSION, dotnetArch) through official/non-official pipelines and stage templates.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
build.psm1 Adds early-access NuGet config switching and a helper to download early-access .NET SDK archives.
.pipelines/templates/windows-hosted-build.yml Threads dotnetArch into install-dotnet.yml for Windows hosted builds.
.pipelines/templates/variables/PowerShell-Packages-Variables.yml Introduces early-access parameters and exports them as pipeline variables for package pipelines.
.pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml Introduces early-access parameters and exports them as pipeline variables for coordinated package pipelines.
.pipelines/templates/testartifacts.yml Pins install-dotnet.yml architecture per job (Windows/Linux).
.pipelines/templates/stages/PowerShell-Release-Stages.yml Adds a dedicated early-access .NET download stage and wires dependencies/parameters through release validation stages.
.pipelines/templates/stages/PowerShell-Packages-Stages.yml Adds an “Early .NET Setup” stage and makes packaging stages depend on it.
.pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml Adds optional early-access .NET download work to the coordinated packages pipeline flow.
.pipelines/templates/release-validate-sdk.yml Adds early-access parameters/variables and updates SDK validation to use early-access feed selection and install-dotnet arch selection.
.pipelines/templates/release-validate-globaltools.yml Adds early-access parameters/variables and threads dotnetArch to install-dotnet.yml.
.pipelines/templates/release-validate-fxdpackages.yml Adds early-access parameters/variables and threads dotnetArch to install-dotnet.yml.
.pipelines/templates/packaging/windows/package.yml Threads dotnetArch into install-dotnet.yml for Windows packaging build.
.pipelines/templates/mac.yml Threads dotnetArch into install-dotnet.yml for macOS build jobs.
.pipelines/templates/linux.yml Threads dotnetArch into install-dotnet.yml for Linux build jobs.
.pipelines/templates/linux-package-build.yml Threads dotnetArch into install-dotnet.yml for Linux packaging jobs.
.pipelines/templates/install-dotnet.yml Adds architecture parameter and early-access path to install SDK from downloaded artifacts.
.pipelines/templates/insert-nuget-config-azfeed.yml Switches NuGet config behavior for early access and adds Azure Artifacts credential setup for early-access feeds.
.pipelines/templates/downloadDotnetEarlyAccess.yml New template to download early-access .NET SDK archives and publish them as a pipeline artifact.
.pipelines/PowerShell-Release-Official.yml Adds queue-time early-access parameters and passes them into release stages.
.pipelines/PowerShell-Packages-Official.yml Adds queue-time early-access parameters and passes them into package stages/variables.
.pipelines/PowerShell-Coordinated_Packages-Official.yml Adds queue-time early-access parameters and passes them into coordinated package stages/variables.
.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml Mirrors early-access parameterization for non-official release pipeline.
.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml Mirrors early-access parameterization for non-official packages pipeline.
.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml Mirrors early-access parameterization for non-official coordinated packages pipeline.
Suppressed comments (2)

.pipelines/templates/insert-nuget-config-azfeed.yml:91

  • The AzurePowerShell credential setup step only runs when ISEARLYACCESS is exactly 'true', and it ignores the existing UseAzDevOpsFeed guard used by the other steps in this template. This can either skip setup when the boolean is True, or run unexpectedly when feed switching is disabled.
  condition: eq(variables['ISEARLYACCESS'], 'true')

.pipelines/templates/install-dotnet.yml:98

  • The early-access install step only runs when ISEARLYACCESS is exactly 'true'. If the variable is True, the job will skip installing the early-access SDK and continue with the default SDK.
    condition: eq(variables['ISEARLYACCESS'], 'true')

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +56 to +61
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-Host "##vso[task.setsecret]$azt"

Write-Verbose -Verbose "Running: Switch-PSNugetConfig -Source Private -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)'"
Switch-PSNugetConfig -Source Private -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)'
$earlyAccess = $env:ISEARLYACCESS -eq 'true'

- task: DownloadPipelineArtifact@2
displayName: "Download dotnet-packages artifact"
condition: eq(variables['ISEARLYACCESS'], 'true')

$isEarlyAccess = '$(ISEARLYACCESS)'

$ADORepoUri = if ($isEarlyAccess -eq 'True')
Comment thread build.psm1
Comment on lines +2607 to +2609
[Parameter(Mandatory)]
[string]$DOTNET_PRIVATE_SAS
)
Comment thread build.psm1
Comment on lines 899 to 903
param(
[Parameter(Mandatory = $true, ParameterSetName = 'user')]
[Parameter(Mandatory = $true, ParameterSetName = 'nouser')]
[ValidateSet('Public', 'Private', 'NuGetOnly')]
[ValidateSet('Public', 'Private', 'NuGetOnly', 'EarlyAccess')]
[string] $Source,
Comment thread build.psm1
Comment on lines +2603 to +2622
[Parameter(Mandatory)]
[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 f714866 into PowerShell:release/v7.6.5 Aug 10, 2026
39 checks passed
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) deleted the backport/release/v7.6.5/27795-9f7470700 branch August 10, 2026 21:18
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