Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6cbeb52
Run RepoTests in the official build's ValidateSdk stage + add runVali…
mmitche Jul 7, 2026
de5a7c3
Promote arcade to '.NET Eng - Latest' using the newly built Arcade (d…
mmitche Jul 7, 2026
8414fa0
Rework official-build validation: signing + self-build + promotion, s…
mmitche Jul 9, 2026
e942b69
Reuse existing SignTool.Tests resources for signing validation
mmitche Jul 10, 2026
7f7f36a
Stage signing test VSIXes on the Linux and macOS signing jobs too
mmitche Jul 10, 2026
efeb511
Inline the promote-to-latest darc command; share signing copy list vi…
mmitche Jul 10, 2026
9888209
Drop the GitHub PAT from update-packagesource / update-dependencies
mmitche Jul 10, 2026
9fab8ca
Potential fix for pull request finding
mmitche Jul 10, 2026
51942e1
Address PR feedback: cross-platform update-packagesource + promotion-…
mmitche Jul 10, 2026
f56f431
Fix Linux signing job pool for 1ES: specify image + os: linux
mmitche Jul 10, 2026
d281484
Fix signing artifact download (Release) and promotion-validation GitH…
mmitche Jul 10, 2026
d4cc3b2
Use TeamName (not _TeamName) variable so MicroBuild can install on Ma…
mmitche Jul 10, 2026
24da3d3
Fix StrictMode-unsafe \True check in update-packagesource (regression)
mmitche Jul 10, 2026
7b2c50b
Signing validation: bump the built SDK with a cross-platform script (…
mmitche Jul 10, 2026
550158c
Gate promotion validation on the build being assigned to a channel
mmitche Jul 10, 2026
3403b92
use-built-sdk: add each nupkg folder as a flat feed so the new SDK re…
mmitche Jul 10, 2026
ab503f4
Add packageSourceMapping entries for local feeds in use-built-sdk.ps1
mmitche Jul 10, 2026
bed3132
Make promotion channel gate StrictMode-safe
mmitche Jul 10, 2026
b652acc
Fix StrictMode $null.Count in promotion channel gate
mmitche Jul 10, 2026
b376ea6
Self-build validation: use the newly built SDK (not the bootstrap SDK)
mmitche Jul 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ trigger:
- THIRD-PARTY-NOTICES.TXT
pr: none

parameters:
# Bootstrap-breakage escape hatch. The ValidateSdk stage self-bootstraps arcade with the newly
# produced SDK and validates signing + promotion using that SDK; publishing depends on it.
# Override to false at queue time to ship a new Arcade when the current one cannot self-validate.
- name: runValidateSdk
displayName: Run the Validate Arcade SDK stage (signing + self-build + promotion validation)
type: boolean
default: true

variables:
- template: /eng/common-variables.yml@self
parameters:
Expand Down Expand Up @@ -59,3 +68,4 @@ extends:
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
oneLocEnabled: true
microbuildUseESRP: true
runValidateSdk: ${{ parameters.runValidateSdk }}
108 changes: 96 additions & 12 deletions eng/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ parameters:
- name: microbuildUseESRP
default: false
type: boolean
# When true (default), run the Validate Arcade SDK stage: three parallel validations of the newly
# produced SDK - signing validation, self-build (self-bootstrap), and promotion to a test channel
# with the new Arcade. Set to false as a bootstrap-breakage escape hatch to ship a new Arcade when
# the current one cannot self-validate; the promotion to '.NET Eng - Latest' still runs on build
# success.
- name: runValidateSdk
default: true
type: boolean

stages:
- stage: build
Expand Down Expand Up @@ -49,17 +57,25 @@ stages:
/p:Test=false
displayName: Windows Build / Publish

- stage: ValidateSdk
displayName: Validate Arcade SDK
dependsOn: build
jobs:
- template: /eng/validate-sdk.yml@self
parameters:
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
buildArgs: -configuration $(_BuildConfig)
-prepareMachine
$(_InternalBuildArgs)
/p:Test=false
- ${{ if eq(parameters.runValidateSdk, true) }}:
- stage: ValidateSdk
displayName: Validate Arcade SDK
dependsOn: build
jobs:
# Self-bootstrap: rebuild arcade with the newly produced SDK (build + sign + pack + publish).
- template: /eng/validate-sdk.yml@self
parameters:
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
buildArgs: -configuration $(_BuildConfig)
-prepareMachine
$(_InternalBuildArgs)
/p:Test=false
Comment on lines +69 to +72
# Sign a curated set of artifact types with the newly built SignTool.
- template: /eng/validate-signing.yml@self
parameters:
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
# Validate that build promotion works when driven by the newly built Arcade.
- template: /eng/validate-promotion.yml@self

- template: /eng/common/templates-official/post-build/post-build.yml@self
parameters:
Expand All @@ -68,4 +84,72 @@ stages:
enableSigningValidation: false
publishDependsOn:
- Validate
- ValidateSdk
- ${{ if eq(parameters.runValidateSdk, true) }}:
- ValidateSdk

# Promote the build to '.NET Eng - Latest' using the current/default Arcade. Runs after a successful
# build, and - when validation is enabled - after ValidateSdk passes, so a build can still be promoted
# when validation is disabled. Main only: release branches keep using dotnet/arcade-validation for
# this gate (see #17046). The assets were already published to '.NET Eng - Validation' by the
# post-build publish stage, so this uses --skip-assets-publishing.
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
- stage: PromoteToLatest
displayName: Promote to '.NET Eng - Latest'
dependsOn:
- publish_using_darc
- ${{ if eq(parameters.runValidateSdk, true) }}:
- ValidateSdk
jobs:
- template: /eng/common/templates-official/job/job.yml@self
parameters:
name: PromoteToLatest
displayName: Promote to '.NET Eng - Latest'
enableMicrobuild: false
timeoutInMinutes: 60
# The publish-build-assets job writes the BAR build id as the first line of ReleaseConfigs.txt.
artifacts:
download:
name: ReleaseConfigs
path: release_configs
variables:
- group: Publish-Build-Assets
- template: /eng/common/templates-official/variables/pool-providers.yml@self
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2026.amd64
preSteps:
- checkout: self
clean: true
steps:
- powershell: |
$releaseConfigs = Get-Content "$(System.DefaultWorkingDirectory)/release_configs/ReleaseConfigs.txt"
$barId = ($releaseConfigs | Select-Object -First 1).Trim()
if ([string]::IsNullOrEmpty($barId)) { Write-Error "Could not read BAR build id from ReleaseConfigs.txt"; exit 1 }
Write-Host "BAR build id: $barId"
Write-Host "##vso[task.setvariable variable=BARBuildId]$barId"
Comment on lines +125 to +129
displayName: Read BAR build id
- task: AzureCLI@2
displayName: Get AzDO token (WIF)
name: GetAzDoToken
inputs:
azureSubscription: "dnceng-build-rw-code-rw-wif"
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
$azdoToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query accessToken -o tsv
if ($LASTEXITCODE -ne 0) { Write-Error "Failed to get AzDO token"; exit 1 }
Write-Host "##vso[task.setvariable variable=WifAzDoToken;issecret=true]$azdoToken"
- task: AzureCLI@2
displayName: Promote to '.NET Eng - Latest'
inputs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
$ci = $true
$disableConfigureToolsetImport = $true
. $(Build.SourcesDirectory)/eng/common/tools.ps1
$darc = Get-Darc
# Assets were already published to '.NET Eng - Validation'; this is the promotion gate.
& $darc add-build-to-channel --id $(BARBuildId) --channel '.NET Eng - Latest' --azdev-pat $(WifAzDoToken) --ci --skip-assets-publishing
if ($LASTEXITCODE -ne 0) { Write-Error "Failed to promote build $(BARBuildId) to '.NET Eng - Latest'."; exit 1 }
14 changes: 8 additions & 6 deletions eng/update-packagesource.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Param(
[string] $gitHubPat,
[string] $packagesSource
)

$ErrorActionPreference = "Stop"
. $PSScriptRoot\common\tools.ps1
. "$PSScriptRoot/common/tools.ps1"

# Batch and executable files exit and define $LASTEXITCODE. Powershell commands exit and define $?
function CheckExitCode ([string]$stage, [bool]$commandExitCode = $True)
Expand Down Expand Up @@ -62,16 +61,19 @@ try {

Write-Host "Updating dependencies using Darc..."
$dotnetRoot = InitializeDotNetCli -install:$true
$DarcExe = "$dotnetRoot\tools"
$DarcExe = Join-Path $dotnetRoot "tools"
Create-Directory $DarcExe
$DarcExe = Resolve-Path $DarcExe
. .\common\darc-init.ps1 -toolpath $DarcExe
. "$PSScriptRoot/common/darc-init.ps1" -toolpath $DarcExe
CheckExitCode "Running darc-init"

$Env:dotnet_root = $dotnetRoot
& $DarcExe\darc.exe update-dependencies `
# darc is 'darc.exe' on Windows and 'darc' on Linux/macOS. Use a StrictMode-safe OS check
# ($IsWindows is unset in Windows PowerShell 5.1 and throws under Set-StrictMode).
$darcExecutable = if ([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform([System.Runtime.InteropServices.OSPlatform]::Windows)) { "darc.exe" } else { "darc" }
# Note: --github-pat is only needed for coherency updates, which this does not perform.
& (Join-Path $DarcExe $darcExecutable) update-dependencies `
--packages-folder "$packagesSource" `
--github-pat "$gitHubPat" `
--channel ".NET Tools - Latest" `
--ci

Expand Down
59 changes: 59 additions & 0 deletions eng/validate-promotion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Validates that Arcade build promotion works when driven by the newly built Arcade. One of the
# parallel jobs of the official build's ValidateSdk stage. See eng/validation/validate-promotion.ps1.
#
# NOTE: runs only in the internal official build; not testable locally or in PR. Needs
# @dotnet/dnceng review and a real official-build run to confirm.

jobs:
- template: /eng/common/templates-official/job/job.yml@self
parameters:
name: ValidatePromotion
displayName: Validate promotion (newly built Arcade)
enableMicrobuild: false
timeoutInMinutes: 120
# The publish-build-assets job writes the BAR build id as the first line of ReleaseConfigs.txt.
artifacts:
download:
name: ReleaseConfigs
path: release_configs
variables:
- group: Publish-Build-Assets
- template: /eng/common/templates-official/variables/pool-providers.yml@self
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2026.amd64
preSteps:
- checkout: self
clean: true
steps:
- powershell: |
$releaseConfigs = Get-Content "$(System.DefaultWorkingDirectory)/release_configs/ReleaseConfigs.txt"
$barId = ($releaseConfigs | Select-Object -First 1).Trim()
if ([string]::IsNullOrEmpty($barId)) { Write-Error "Could not read BAR build id from ReleaseConfigs.txt"; exit 1 }
Write-Host "BAR build id: $barId"
Write-Host "##vso[task.setvariable variable=BARBuildId]$barId"
Comment on lines +30 to +34
displayName: Read BAR build id
# Token with code read/write on the internal AzDO mirror, to push the update-dependencies branch.
- task: AzureCLI@2
displayName: Get AzDO token (WIF)
name: GetAzDoToken
inputs:
azureSubscription: "dnceng-build-rw-code-rw-wif"
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
$azdoToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query accessToken -o tsv
if ($LASTEXITCODE -ne 0) { Write-Error "Failed to get AzDO token"; exit 1 }
Write-Host "##vso[task.setvariable variable=WifAzDoToken;issecret=true]$azdoToken"
- task: AzureCLI@2
displayName: Validate promotion with the newly built Arcade
inputs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
scriptPath: $(System.DefaultWorkingDirectory)/eng/validation/validate-promotion.ps1
arguments: >
-BuildId $(BARBuildId)
-Commit $(Build.SourceVersion)
-AzdoToken $(WifAzDoToken)
-GitHubPat $(BotAccount-dotnet-maestro-bot-PAT)
1 change: 0 additions & 1 deletion eng/validate-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
scriptLocation: inlineScript
inlineScript: >
.\eng\update-packagesource.ps1
-gitHubPat $(BotAccount-dotnet-maestro-bot-PAT)
-packagesSource $(System.DefaultWorkingDirectory)/build_stage_artifacts
- script: eng\common\cibuild.cmd
$(_BuildArgs)
Expand Down
Loading