Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0e0c49b
Use dotnetup preview for SDK acquisition
nagilson Aug 6, 2026
b6952bc
Merge branch 'release/10.0.4xx' into nagilson/dotnetup-preview-releas…
nagilson Aug 6, 2026
5b45bd7
Discover installed 8.0.x runtime in DepsJson version test (#54619)
nagilson Jun 5, 2026
7ff1222
Merge branch 'release/10.0.4xx' into nagilson/dotnetup-preview-releas…
nagilson Aug 6, 2026
9b7015e
Avoid overlaying current-band test runtimes
marcpopMSFT Aug 11, 2026
8e1c7bd
Decode captured test stdout as UTF-8 to fix flaky satellite-assembly …
MichaelSimons Jul 23, 2026
b1e5b0e
Remove the giant watermark.
nagilson Sep 8, 2026
3a8361d
[release/10.0.4xx] Trusted roots: 2026-08 CTL (#56200)
dtivel Sep 9, 2026
1d72d34
Add new NuGet cert hash (#56242)
mmitche Sep 11, 2026
fa30291
[release/10.0.4xx] Add dotnet test --results-directory-layout (#55629)
Evangelink Sep 14, 2026
9fbdc79
Backflow from https://github.com/dotnet/dotnet / 127cfac build 331897
dotnet-maestro[bot] Sep 14, 2026
10f8b56
Update dependencies from build 331897
dotnet-maestro[bot] Sep 14, 2026
2c6e307
[release/10.0.4xx] Backport MTP diagnostics and --nologo support (#55…
Evangelink Sep 14, 2026
0ad7420
Initial plan
Copilot Aug 23, 2026
6137012
Include generated NetAnalyzers assets during pack
Copilot Aug 23, 2026
28c18a4
Validate generated NetAnalyzers package assets
Copilot Aug 23, 2026
1a7c8b3
Clarify expected analyzer package files
Copilot Aug 23, 2026
3515500
Remove redundant NetAnalyzers package validation
jeffhandley Aug 24, 2026
be62162
Use established NetAnalyzers pack hook
jeffhandley Aug 24, 2026
e62be12
Merge branch 'release/10.0.4xx' into backport-utf8-test-output-releas…
nagilson Sep 15, 2026
002ac71
[release/10.0.4xx] Source code updates from dotnet/dotnet (#56293)
joeloff Sep 15, 2026
e1f8329
Update dependencies from build 332297
dotnet-maestro[bot] Sep 16, 2026
700cf0c
[release/10.0.4xx] Source code updates from dotnet/dotnet (#56324)
joeloff Sep 16, 2026
9c4c9fc
Update dependencies from build 333232
dotnet-maestro[bot] Sep 22, 2026
f7f4499
[release/10.0.4xx] Restore generated assets in Microsoft.CodeAnalysis…
tannergooding Sep 22, 2026
aadbc13
Merge branch 'release/10.0.4xx' into backport/pr-56242-to-release/10.…
nagilson Sep 22, 2026
22d65a8
Merge branch 'release/10.0.4xx' into backport-utf8-test-output-releas…
nagilson Sep 22, 2026
a8c0e60
[release/10.0.4xx] Add new NuGet cert hash (#56262)
nagilson Sep 22, 2026
d037e5f
[release/10.0.4xx] Decode captured test output as UTF-8 (#56181)
nagilson Sep 22, 2026
7236cfd
[release/10.0.4xx] Fix dotnet test argument isolation after -- (#56374)
Evangelink Sep 23, 2026
e6d10d9
[release/10.0.4xx] Source code updates from dotnet/dotnet (#56372)
nagilson Sep 24, 2026
f97eb6a
[release/10.0.4xx] Source code updates from dotnet/dotnet (#56420)
dotnet-maestro[bot] Sep 30, 2026
f6300e7
[release/10.0.4xx] Source code updates from dotnet/dotnet (#56455)
dotnet-maestro[bot] Oct 1, 2026
3b57968
[10.0.4xx] Use dotnetup preview for .NET acquisition (#55640)
nagilson Oct 12, 2026
45619cd
Reset files to release/11.0.1xx
github-actions[bot] Oct 12, 2026
73dfcfb
Merge release/11.0.1xx into merge/release/10.0.4xx-to-release/11.0.1xx
mthalman Oct 28, 2026
d45b4af
Restore dotnet test explicit build path option handling lost in merge
mthalman Oct 28, 2026
0242b89
Merge remote-tracking branch 'origin/release/11.0.1xx' into merge/rel…
Copilot Oct 28, 2026
93718bf
[automated] Merge branch 'release/10.0.4xx' => 'release/11.0.1xx' (#5…
mthalman Oct 29, 2026
c37016c
Do not delay exit waiting for telemetry
nagilson Oct 30, 2026
e5668b1
Do not delay exit waiting for telemetry (#56863)
nagilson Nov 2, 2026
5654959
Reset files to release/11.0.2xx
github-actions[bot] Nov 2, 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
1 change: 0 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-dotnet -->
<add key="darc-pub-dotnet-dotnet-3e57c9d" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-3e57c9d3/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-dotnet -->
<!-- Begin: Package sources from microsoft-testfx -->
<!-- End: Package sources from microsoft-testfx -->
Expand Down
10 changes: 6 additions & 4 deletions documentation/project-docs/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ and delivery. [TelemetryClient](../../src/Cli/dotnet/Telemetry/TelemetryClient.c
use a separate 300-ms trace allowance in each runtime; there is no cross-runtime deadline coordination.
Normal exports before shutdown remain network-first; this is not synchronous
persistence of every ended span, and abrupt termination can lose queued spans. An upload already in flight
can still delay shutdown. Successful local shutdown waits for the batch processor to finish rather than
applying the old 10-ms timeout to persistence. Failed-command persistence is subject to the 300-ms timeout.
can still delay shutdown. Successful local shutdown gives the trace batch processor 100 ms to finalize
persistence; the zero drain budget prevents waiting for the subsequent upload. This is long enough for a cold
exporter to complete its atomic file write without reintroducing an unbounded exit delay. Failed-command
persistence is subject to the 300-ms timeout.
2. **Subsequent invocations.** Azure schedules an eager background drain after a 50-ms startup delay; actual
start time also depends on thread scheduling and storage work. The two-minute periodic retry timer remains.
Accepted payloads are deleted; retryable failures remain for later attempts. Storage partitioning, retention,
Expand All @@ -113,8 +115,8 @@ and delivery. [TelemetryClient](../../src/Cli/dotnet/Telemetry/TelemetryClient.c
be persisted, and a timeout can leave telemetry undelivered.
4. **Persistent MSBuild hosts.** A logger finishes a build request with nonterminal `ForceFlush`, allowing the
same provider to handle later builds. Locally the SDK enables
`Azure.Monitor.OpenTelemetry.Exporter.PersistOnForceFlush`; process exit uses `Shutdown`. CI uses a bounded
network-first flush. A force-flush result is not an ingestion acknowledgment.
`Azure.Monitor.OpenTelemetry.Exporter.PersistOnForceFlush` and gives trace persistence 100 ms; process exit uses
`Shutdown`. CI uses a bounded network-first flush. A force-flush result is not an ingestion acknowledgment.

These Azure settings are process-wide. OTLP-enabled invocations retain bounded provider shutdown, and the trace
and metric providers share the configured wait budget. This bounds provider waits, not all process-exit work. Azure's
Expand Down
252 changes: 126 additions & 126 deletions eng/Version.Details.props

Large diffs are not rendered by default.

506 changes: 253 additions & 253 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

123 changes: 40 additions & 83 deletions eng/common/Get-GitHubAppToken.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Mints a short-lived GitHub App installation access token by signing a JWT
# with an RSA private key (RS256). The signed JWT is exchanged with the GitHub
# API for a token scoped to a single installation.
# with a private key stored in Azure Key Vault (RSA, RS256). The signed JWT is
# exchanged with the GitHub API for a token scoped to a single installation.
#
# Requirements:
# - A GitHub App ID and PEM private key stored as Azure Key Vault secrets.
# - The federated Azure service connection running this script must have
# `Get` access to those two secrets.
# - A GitHub App whose private key has been uploaded into Key Vault as an RSA
# key (the PEM converted to a Key Vault *key*, NOT stored as a secret).
# - The caller (the federated Azure service connection used to run this script)
# must have the `Key Vault Crypto User` role (or at minimum the `Sign`
# action) on that key.
# - The App must be installed on the target organization/account
# (`InstallationOwner`) with the permissions/repositories it needs.
#
Expand All @@ -14,17 +16,17 @@

[CmdletBinding()]
param(
# Name of the Key Vault holding the GitHub App credentials.
# Name of the Key Vault that holds the GitHub App's RSA signing key.
[Parameter(Mandatory = $true)]
[string] $KeyVaultName,

# Secret Manager projection containing the GitHub App ID.
# Name of the RSA key inside the Key Vault (the App's private key).
[Parameter(Mandatory = $true)]
[string] $AppIdSecretName,
[string] $KeyName,

# Secret Manager projection containing the PEM private key.
# The GitHub App's Client ID (the value to put in the `iss` JWT claim).
[Parameter(Mandatory = $true)]
[string] $AppPrivateKeySecretName,
[string] $AppClientId,

# Login of the organization or user account whose installation we should
# mint the token for (e.g. `dotnet`, `microsoft`).
Expand All @@ -37,69 +39,16 @@ param(
[Parameter(Mandatory = $false)]
[string] $OutputVariableName
)

$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true

. $PSScriptRoot\pipeline-logging-functions.ps1

if ($KeyVaultName -notmatch '^[A-Za-z][A-Za-z0-9-]{1,22}[A-Za-z0-9]$' -or $KeyVaultName.Contains('--')) {
Write-PipelineTelemetryError -Category 'Build' -Message "KeyVaultName '$KeyVaultName' is not a valid Azure Key Vault name."
exit 1
}

function ConvertTo-Base64Url([byte[]] $bytes) {
return [Convert]::ToBase64String($bytes).TrimEnd('=').Replace('+', '-').Replace('/', '_')
}

$previousNativeCommandErrorPreference = $PSNativeCommandUseErrorActionPreference
try {
# Azure CLI can emit non-fatal Python warnings to stderr.
$PSNativeCommandUseErrorActionPreference = $false
$keyVaultAccessToken = az account get-access-token `
--resource https://vault.azure.net `
--query accessToken `
--output tsv `
--only-show-errors
$tokenExitCode = $LASTEXITCODE
}
catch {
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to acquire an Azure Key Vault access token: $_"
exit 1
}
finally {
$PSNativeCommandUseErrorActionPreference = $previousNativeCommandErrorPreference
}
if ($tokenExitCode -ne 0 -or [string]::IsNullOrWhiteSpace($keyVaultAccessToken)) {
Write-PipelineTelemetryError -Category 'Build' -Message "'az account get-access-token' exited with code $tokenExitCode while acquiring an Azure Key Vault access token."
exit 1
}

function Get-KeyVaultSecret([string] $SecretName) {
# Use the data-plane REST API because `az keyvault secret show` can fail
# with Errno 22 on hosted Windows agents when reading these projections.
$escapedSecretName = [Uri]::EscapeDataString($SecretName)
$secretUri = "https://$KeyVaultName.vault.azure.net/secrets/$escapedSecretName`?api-version=7.4"
try {
$response = Invoke-RestMethod `
-Uri $secretUri `
-Headers @{ Authorization = "Bearer $keyVaultAccessToken" } `
-Method Get
}
catch {
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to read secret '$SecretName' from vault '$KeyVaultName': $_. Verify the secret exists and the service connection has 'Key Vault Secrets User' access to it."
exit 1
}
if ([string]::IsNullOrWhiteSpace($response.value)) {
Write-PipelineTelemetryError -Category 'Build' -Message "Secret '$SecretName' in vault '$KeyVaultName' is empty."
exit 1
}
return [string] $response.value
}

Write-Host "Reading GitHub App credentials from vault '$KeyVaultName'..."
$appId = Get-KeyVaultSecret $AppIdSecretName
$privateKey = Get-KeyVaultSecret $AppPrivateKeySecretName

# Build JWT header and payload. Use [ordered] hashtables so JSON
# serialization is deterministic.
$jwtHeader = [ordered]@{
Expand All @@ -110,38 +59,46 @@ $now = [System.DateTimeOffset]::UtcNow
$jwtPayload = [ordered]@{
iat = $now.AddMinutes(-1).ToUnixTimeSeconds()
exp = $now.AddMinutes(5).ToUnixTimeSeconds()
iss = $appId
iss = $AppClientId
}

$headerEncoded = ConvertTo-Base64Url ([System.Text.Encoding]::UTF8.GetBytes(($jwtHeader | ConvertTo-Json -Compress)))
$payloadEncoded = ConvertTo-Base64Url ([System.Text.Encoding]::UTF8.GetBytes(($jwtPayload | ConvertTo-Json -Compress)))
$signingInput = "$headerEncoded.$payloadEncoded"

$sha256 = [System.Security.Cryptography.SHA256]::Create()
try {
$digestBytes = $sha256.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($signingInput))
}
finally {
$sha256.Dispose()
}
# Key Vault `sign` expects the *digest* (base64), not the raw bytes.
$sha256 = [System.Security.Cryptography.SHA256]::Create()
$digestBytes = $sha256.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($signingInput))
$digestBase64 = [Convert]::ToBase64String($digestBytes)

Write-Host 'Signing JWT with the GitHub App private key...'
$rsa = [System.Security.Cryptography.RSA]::Create()
Write-Host "Signing JWT with key '$KeyName' in vault '$KeyVaultName'..."
$previousNativeCommandErrorPreference = $PSNativeCommandUseErrorActionPreference
try {
$rsa.ImportFromPem($privateKey)
$signatureBytes = $rsa.SignHash(
$digestBytes,
[System.Security.Cryptography.HashAlgorithmName]::SHA256,
[System.Security.Cryptography.RSASignaturePadding]::Pkcs1)
$signatureUrl = ConvertTo-Base64Url $signatureBytes
# Azure CLI can emit non-fatal Python warnings to stderr even when signing succeeds.
# Use the exit code to determine success for this invocation.
$PSNativeCommandUseErrorActionPreference = $false
$signatureBase64 = az keyvault key sign `
--vault-name $KeyVaultName `
--name $KeyName `
--algorithm RS256 `
--digest $digestBase64 `
--query signature `
--output tsv `
--only-show-errors
$signExitCode = $LASTEXITCODE
}
catch {
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to sign the GitHub App JWT with the supplied private key: $_"
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to sign the JWT via Key Vault (key '$KeyName', vault '$KeyVaultName'): $_. Verify the service connection identity has the 'Key Vault Crypto User' role (Sign action) on the key."
exit 1
}
finally {
$rsa.Dispose()
$PSNativeCommandUseErrorActionPreference = $previousNativeCommandErrorPreference
}
if ($signExitCode -ne 0 -or [string]::IsNullOrWhiteSpace($signatureBase64)) {
Write-PipelineTelemetryError -Category 'Build' -Message "'az keyvault key sign' exited with code $signExitCode for key '$KeyName' in vault '$KeyVaultName'. Verify the service connection identity has the 'Key Vault Crypto User' role (Sign action) on the key."
exit 1
}
$signatureUrl = $signatureBase64.Trim().TrimEnd('=').Replace('+', '-').Replace('/', '_')
$jwt = "$signingInput.$signatureUrl"

$headers = @{
Expand Down Expand Up @@ -169,7 +126,7 @@ try {
} while ($pageInstallationCount -eq 100)
}
catch {
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to list GitHub App installations: $_. The signed JWT may be invalid or the App ID may be incorrect."
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to list GitHub App installations: $_. The signed JWT may be invalid or the App's Client ID ('$AppClientId') may be incorrect."
exit 1
}
$matchingInstallations = @($installations | Where-Object { $_.account.login -ieq $InstallationOwner })
Expand Down
135 changes: 94 additions & 41 deletions eng/common/core-templates/job/helix-job-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ parameters:
type: boolean
default: false

# Workload identity federation service connection name authorized for Helix. Required when
# Azure service connection ID authorized for Helix. Required when
# useEntraAuthentication is true.
- name: azureSubscription
type: string
Expand Down Expand Up @@ -94,12 +94,13 @@ parameters:
type: boolean
default: false

# When true (the default), test results are reported to Azure DevOps using the fully qualified test
# name (Namespace.Type.Method) as the stable automatedTestName and the visible title is qualified as
# well (--use-fully-qualified-test-name). Set to false to preserve framework-provided display names.
# When true, test results are reported to Azure DevOps using the fully qualified test name
# (Namespace.Type.Method) as the stable automatedTestName and the visible title is qualified as
# well (--use-fully-qualified-test-name). Opt-in because it changes AzDO test identity and display;
# primarily useful for frameworks like MSTest whose display name is only the method name.
- name: useFullyQualifiedTestName
type: boolean
default: true
default: false

# Controls per-test output attachments. Defaults to Failed.
- name: testResultAttachmentMode
Expand Down Expand Up @@ -135,20 +136,6 @@ jobs:
displayName: Monitor Helix Jobs
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
continueOnError: ${{ parameters.continueOnError }}
variables:
HELIX_MONITOR_BASE_URI: ${{ parameters.helixBaseUri }}
HELIX_MONITOR_USE_ENTRA_AUTHENTICATION: ${{ parameters.useEntraAuthentication }}
HELIX_MONITOR_POLLING_INTERVAL_SECONDS: ${{ parameters.pollingIntervalSeconds }}
HELIX_MONITOR_FAIL_ON_FAILED_TESTS: ${{ parameters.failWorkItemsWithFailedTests }}
HELIX_MONITOR_ALLOW_NO_HELIX_JOBS: ${{ parameters.allowNoHelixJobs }}
HELIX_MONITOR_USE_FULLY_QUALIFIED_TEST_NAME: ${{ parameters.useFullyQualifiedTestName }}
HELIX_MONITOR_TIMEOUT_IN_MINUTES: ${{ parameters.timeoutInMinutes }}
HELIX_MONITOR_TEST_RESULT_UPLOAD_PARALLELISM: ${{ parameters.testResultUploadParallelism }}
HELIX_MONITOR_ORGANIZATION: ${{ parameters.organization }}
HELIX_MONITOR_REPOSITORY: ${{ parameters.repository }}
HELIX_MONITOR_TEST_RESULT_ATTACHMENT_MODE: ${{ parameters.testResultAttachmentMode }}
HELIX_MONITOR_TOOL_NUPKG_ARTIFACT_NAME: ${{ parameters.toolNupkgArtifactName }}
HELIX_MONITOR_TOOL_COMMAND: ${{ parameters.toolCommand }}
${{ if ne(length(parameters.dependsOn), 0) }}:
dependsOn: ${{ parameters.dependsOn }}
${{ if ne(parameters.condition, '') }}:
Expand All @@ -170,6 +157,22 @@ jobs:
- pwsh: throw "azureSubscription must be set when useEntraAuthentication is true."
displayName: Validate Helix Entra authentication

- ${{ if eq(parameters.useEntraAuthentication, true) }}:
- task: AzureCLI@2
displayName: Initialize Helix Entra authentication
inputs:
azureSubscription: ${{ parameters.azureSubscription }}
addSpnToEnvironment: true
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
if ([string]::IsNullOrWhiteSpace($env:servicePrincipalId) -or [string]::IsNullOrWhiteSpace($env:tenantId)) {
throw "The Helix Azure service connection did not provide a service principal or tenant ID."
}

Write-Host "##vso[task.setvariable variable=HelixEntraClientId]$env:servicePrincipalId"
Write-Host "##vso[task.setvariable variable=HelixEntraTenantId]$env:tenantId"

- ${{ if ne(parameters.toolNupkgArtifactName, '') }}:
- task: DownloadPipelineArtifact@2
displayName: Download Helix Job Monitor artifact
Expand Down Expand Up @@ -238,26 +241,76 @@ jobs:
- bash: ./eng/common/dotnet.sh tool restore
displayName: Restore Helix Job Monitor

- ${{ if eq(parameters.useEntraAuthentication, true) }}:
- task: AzureCLI@2
displayName: Monitor Helix Jobs
inputs:
azureSubscription: ${{ parameters.azureSubscription }}
keepAzSessionActive: true
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
set -euo pipefail

# AzureCLI@2 replaces SYSTEM_ACCESSTOKEN with the service connection token.
export SYSTEM_ACCESSTOKEN="$HELIX_AZDO_ACCESSTOKEN"
bash "$BUILD_SOURCESDIRECTORY/eng/common/run-helix-job-monitor.sh"
env:
HELIX_AZDO_ACCESSTOKEN: $(System.AccessToken)

- ${{ if eq(parameters.useEntraAuthentication, false) }}:
- bash: bash "$BUILD_SOURCESDIRECTORY/eng/common/run-helix-job-monitor.sh"
displayName: Monitor Helix Jobs
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- bash: |
set -euo pipefail

toolArgs=(
--helix-base-uri '${{ parameters.helixBaseUri }}'
--use-entra-authentication '${{ parameters.useEntraAuthentication }}'
--polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}'
--fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}'
--allow-no-helix-jobs '${{ parameters.allowNoHelixJobs }}'
--use-fully-qualified-test-name '${{ parameters.useFullyQualifiedTestName }}'
--max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully.
--stage-name '$(System.StageName)'
--stage-attempt '$(System.StageAttempt)'
--job-attempt '$(System.JobAttempt)'
--test-result-upload-parallelism '${{ parameters.testResultUploadParallelism }}'
)

organization='${{ parameters.organization }}'
repository='${{ parameters.repository }}'
testResultAttachmentMode='${{ parameters.testResultAttachmentMode }}'

# Fall back to Azure DevOps-provided environment variables when the caller did not
# supply organization / repository explicitly. BUILD_REPOSITORY_NAME is typically
# 'owner/repo' for GitHub-backed builds and 'owner-repo' for internal builds.
if [ -z "$organization" ] || [ -z "$repository" ]; then
buildRepoName="${BUILD_REPOSITORY_NAME:-}"
if [ -n "$buildRepoName" ] && [[ "$buildRepoName" == */* ]]; then
repoOwner="${buildRepoName%%/*}"
repoName="${buildRepoName#*/}"
elif [ -n "$buildRepoName" ] && [[ "$buildRepoName" == *-* ]]; then
repoOwner="${buildRepoName%%-*}"
repoName="${buildRepoName#*-}"
fi

if [ -n "${repoOwner:-}" ] && [ -n "${repoName:-}" ]; then
if [ -z "$organization" ]; then organization="$repoOwner"; fi
if [ -z "$repository" ]; then repository="$repoName"; fi
fi
fi

if [ -n "$organization" ]; then toolArgs+=( --organization "$organization" ); fi
if [ -n "$repository" ]; then toolArgs+=( --repository "$repository" ); fi
if [ -n "$testResultAttachmentMode" ]; then
toolArgs+=( --test-result-attachment-mode "$testResultAttachmentMode" )
fi

# Build.Reason and Build.SourceBranch are required to derive the Helix source filter
# the same way the Helix SDK submitter does (PR -> 'pr', internal -> 'official',
# otherwise -> 'ci'). Without these, manually-queued / scheduled / CI builds would
# be looked up under the wrong source prefix and find zero jobs.
toolArgs+=( --build-reason "$(Build.Reason)" )
toolArgs+=( --source-branch "$(Build.SourceBranch)" )

if [ -n '${{ parameters.toolNupkgArtifactName }}' ]; then
# Tool was installed from a local nupkg; run the DLL via the repo-local dotnet.
export DOTNET_ROOT="$(Build.SourcesDirectory)/.dotnet"
./eng/common/dotnet.sh exec "$(HelixJobMonitorDll)" "${toolArgs[@]}"
else
# Tool was restored from the local .config/dotnet-tools.json manifest; invoke it
# through the manifest from the repo root.
pushd "$BUILD_SOURCESDIRECTORY" > /dev/null
trap 'popd > /dev/null' EXIT
./eng/common/dotnet.sh tool run '${{ parameters.toolCommand }}' -- "${toolArgs[@]}"
fi
displayName: Monitor Helix Jobs
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
${{ if eq(parameters.useEntraAuthentication, false) }}:
HELIX_ACCESSTOKEN: ${{ parameters.helixAccessToken }}
${{ if eq(parameters.useEntraAuthentication, true) }}:
AZURESUBSCRIPTION_CLIENT_ID: $(HelixEntraClientId)
AZURESUBSCRIPTION_TENANT_ID: $(HelixEntraTenantId)
AZURESUBSCRIPTION_SERVICE_CONNECTION_ID: ${{ parameters.azureSubscription }}
Loading
Loading