Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<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-8e67f20" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-8e67f200/nuget/v3/index.json" />
<add key="darc-pub-dotnet-dotnet-2e99fe9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-2e99fe9a/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-dotnet -->
<!-- Begin: Package sources from dotnet-runtime -->
<!-- End: Package sources from dotnet-runtime -->
Expand Down
10 changes: 5 additions & 5 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ This file should be imported by eng/Versions.props
<Project>
<PropertyGroup>
<!-- dotnet-dotnet dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26466.121</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.26466.121</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftDotNetHelixSdkPackageVersion>10.0.0-beta.26466.121</MicrosoftDotNetHelixSdkPackageVersion>
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26469.106</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.26469.106</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftDotNetHelixSdkPackageVersion>10.0.0-beta.26469.106</MicrosoftDotNetHelixSdkPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>10.0.13</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>10.0.13</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>10.0.13</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>10.0.13</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>10.0.13</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>10.0.13</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>10.0.13</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>10.0.13-servicing.26466.121</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>10.0.13-servicing.26469.106</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>10.0.13</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>10.0.13</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>10.0.13-servicing.26466.121</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>10.0.13-servicing.26469.106</MicrosoftNETCorePlatformsPackageVersion>
<SystemFormatsAsn1PackageVersion>10.0.13</SystemFormatsAsn1PackageVersion>
<SystemRuntimeCachingPackageVersion>10.0.13</SystemRuntimeCachingPackageVersion>
<SystemTextEncodingsWebPackageVersion>10.0.13</SystemTextEncodingsWebPackageVersion>
Expand Down
48 changes: 24 additions & 24 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="efcore" Sha="8e67f200553662d0a05cfa62db77f020b7993937" BarId="332475" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="efcore" Sha="2e99fe9a8c6882728b3d23c956d46faaca861cea" BarId="332887" />
<ProductDependencies>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="10.0.13-servicing.26466.121">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="10.0.13-servicing.26469.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.Platforms" Version="10.0.13-servicing.26466.121">
<Dependency Name="Microsoft.NETCore.Platforms" Version="10.0.13-servicing.26469.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="System.Formats.Asn1" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="System.Runtime.Caching" Version="10.0.13">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26466.121">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26469.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.26466.121">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.26469.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26466.121">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26469.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>8e67f200553662d0a05cfa62db77f020b7993937</Sha>
<Sha>2e99fe9a8c6882728b3d23c956d46faaca861cea</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
49 changes: 47 additions & 2 deletions eng/common/core-templates/job/helix-job-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,29 @@ parameters:
type: string
default: https://helix.dot.net/

# Helix API access token forwarded to the tool via the HELIX_ACCESSTOKEN environment variable.
# Helix API access token forwarded via HELIX_ACCESSTOKEN. Not forwarded when
# useEntraAuthentication is true.
- name: helixAccessToken
type: string
default: ''

# Use a refreshable Entra credential instead of a PAT or anonymous access.
- name: useEntraAuthentication
type: boolean
default: false

# Explicit Entra scope for a custom Helix API host (--helix-entra-scope).
# Production and staging scopes are inferred when omitted.
- name: helixEntraScope
type: string
default: ''

# Azure service connection ID authorized for Helix. Required when
# useEntraAuthentication is true.
- name: azureSubscription
type: string
default: ''

# Polling interval in seconds (--polling-interval-seconds).
- name: pollingIntervalSeconds
type: number
Expand Down Expand Up @@ -141,6 +159,26 @@ jobs:
- checkout: self
fetchDepth: 1

- ${{ if and(eq(parameters.useEntraAuthentication, true), eq(parameters.azureSubscription, '')) }}:
- 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 @@ -214,6 +252,8 @@ jobs:

toolArgs=(
--helix-base-uri '${{ parameters.helixBaseUri }}'
--use-entra-authentication '${{ parameters.useEntraAuthentication }}'
--helix-entra-scope '${{ parameters.helixEntraScope }}'
--polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}'
--fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}'
--allow-no-helix-jobs '${{ parameters.allowNoHelixJobs }}'
Expand Down Expand Up @@ -275,4 +315,9 @@ jobs:
displayName: Monitor Helix Jobs
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HELIX_ACCESSTOKEN: ${{ parameters.helixAccessToken }}
${{ 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 }}
3 changes: 2 additions & 1 deletion eng/common/core-templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ jobs:
- name: ${{ pair.key }}
value: ${{ pair.value }}

# DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds
# DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds.
# Entra-enabled Helix templates do not forward this value to their processes.
- ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-HelixApi-Access

Expand Down
45 changes: 42 additions & 3 deletions eng/common/core-templates/steps/send-to-helix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ parameters:
HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
HelixAccessToken: '' # optional -- legacy access token; not forwarded when HelixUseEntraAuthentication is true
HelixUseEntraAuthentication: false # optional -- use refreshable Entra authentication instead of a PAT or anonymous access
HelixEntraScope: '' # optional -- explicit Entra scope required for custom HelixBaseUri hosts
HelixAzureSubscription: '' # required when HelixUseEntraAuthentication is true -- Azure service connection ID authorized for Helix
HelixProjectPath: 'eng/common/helixpublish.proj' # optional -- path to the project file to build relative to BUILD_SOURCESDIRECTORY
HelixProjectArguments: '' # optional -- arguments passed to the build command
HelixConfiguration: '' # optional -- additional property attached to a job
Expand Down Expand Up @@ -32,12 +35,35 @@ parameters:
continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false

steps:
- ${{ if and(eq(parameters.HelixUseEntraAuthentication, true), eq(parameters.HelixAzureSubscription, '')) }}:
- pwsh: throw "HelixAzureSubscription must be set when HelixUseEntraAuthentication is true."
displayName: Validate Helix Entra authentication
condition: ${{ parameters.condition }}

- ${{ if eq(parameters.HelixUseEntraAuthentication, true) }}:
- task: AzureCLI@2
displayName: Initialize Helix Entra authentication
inputs:
azureSubscription: ${{ parameters.HelixAzureSubscription }}
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"
condition: ${{ parameters.condition }}

- powershell: >
$(Build.SourcesDirectory)\eng\common\msbuild.ps1
$(Build.SourcesDirectory)/${{ parameters.HelixProjectPath }}
/restore
/p:TreatWarningsAsErrors=false
/p:EnableHelixJobMonitor=${{ parameters.UseHelixMonitor }}
/p:HelixUseEntraAuthentication=${{ parameters.HelixUseEntraAuthentication }}
${{ parameters.HelixProjectArguments }}
/t:Test
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
Expand All @@ -49,7 +75,13 @@ steps:
HelixBuild: ${{ parameters.HelixBuild }}
HelixConfiguration: ${{ parameters.HelixConfiguration }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
HelixAccessToken: ${{ parameters.HelixAccessToken }}
${{ if eq(parameters.HelixUseEntraAuthentication, false) }}:
HelixAccessToken: ${{ parameters.HelixAccessToken }}
${{ if eq(parameters.HelixUseEntraAuthentication, true) }}:
AZURESUBSCRIPTION_CLIENT_ID: $(HelixEntraClientId)
AZURESUBSCRIPTION_TENANT_ID: $(HelixEntraTenantId)
AZURESUBSCRIPTION_SERVICE_CONNECTION_ID: ${{ parameters.HelixAzureSubscription }}
HelixEntraScope: ${{ parameters.HelixEntraScope }}
HelixPreCommands: ${{ parameters.HelixPreCommands }}
HelixPostCommands: ${{ parameters.HelixPostCommands }}
WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
Expand All @@ -76,6 +108,7 @@ steps:
/restore
/p:TreatWarningsAsErrors=false
/p:EnableHelixJobMonitor=${{ parameters.UseHelixMonitor }}
/p:HelixUseEntraAuthentication=${{ parameters.HelixUseEntraAuthentication }}
${{ parameters.HelixProjectArguments }}
/t:Test
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
Expand All @@ -87,7 +120,13 @@ steps:
HelixBuild: ${{ parameters.HelixBuild }}
HelixConfiguration: ${{ parameters.HelixConfiguration }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
HelixAccessToken: ${{ parameters.HelixAccessToken }}
${{ if eq(parameters.HelixUseEntraAuthentication, false) }}:
HelixAccessToken: ${{ parameters.HelixAccessToken }}
${{ if eq(parameters.HelixUseEntraAuthentication, true) }}:
AZURESUBSCRIPTION_CLIENT_ID: $(HelixEntraClientId)
AZURESUBSCRIPTION_TENANT_ID: $(HelixEntraTenantId)
AZURESUBSCRIPTION_SERVICE_CONNECTION_ID: ${{ parameters.HelixAzureSubscription }}
HelixEntraScope: ${{ parameters.HelixEntraScope }}
HelixPreCommands: ${{ parameters.HelixPreCommands }}
HelixPostCommands: ${{ parameters.HelixPostCommands }}
WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26466.121",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26466.121"
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26469.106",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26469.106"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ public void DoNotPool()

public void Activate(SqliteConnection outerConnection)
{
_active = true;
// Publish the owner before making this connection eligible for leak reclamation.
_outerConnection.SetTarget(outerConnection);
_active = true;
}

public void Close()
Expand Down
Loading