Skip to content

Commit 76c2012

Browse files
[main] Update dependencies from dotnet/arcade (#56035)
1 parent 774663d commit 76c2012

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+548
-483
lines changed

.azure/pipelines/ci-public.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ stages:
573573
agentOs: macOS
574574
timeoutInMinutes: 90
575575
isAzDOTestingJob: true
576-
buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
576+
buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs)
577577
beforeBuild:
578578
- bash: "./eng/scripts/install-nginx-mac.sh"
579579
displayName: Installing Nginx
@@ -594,7 +594,7 @@ stages:
594594
agentOs: Linux
595595
isAzDOTestingJob: true
596596
useHostedUbuntu: false
597-
buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
597+
buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs)
598598
beforeBuild:
599599
- bash: "./eng/scripts/install-nginx-linux.sh"
600600
displayName: Installing Nginx

.azure/pipelines/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ extends:
637637
agentOs: macOS
638638
timeoutInMinutes: 90
639639
isAzDOTestingJob: true
640-
buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
640+
buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs)
641641
beforeBuild:
642642
- bash: "./eng/scripts/install-nginx-mac.sh"
643643
displayName: Installing Nginx
@@ -658,7 +658,7 @@ extends:
658658
agentOs: Linux
659659
isAzDOTestingJob: true
660660
useHostedUbuntu: false
661-
buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
661+
buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs)
662662
beforeBuild:
663663
- bash: "./eng/scripts/install-nginx-linux.sh"
664664
displayName: Installing Nginx

eng/Version.Details.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -388,31 +388,31 @@
388388
<Uri>https://github.com/dotnet/winforms</Uri>
389389
<Sha>25717b4f5d6f00097dc9bc328a3d4652ad71414c</Sha>
390390
</Dependency>
391-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24272.5">
391+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24314.1">
392392
<Uri>https://github.com/dotnet/arcade</Uri>
393-
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
393+
<Sha>92a725aa4d9d6c13dc5229597b51b0b165b8b535</Sha>
394394
</Dependency>
395395
<!-- Intermediate is necessary for source build. -->
396-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24272.5">
396+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24314.1">
397397
<Uri>https://github.com/dotnet/arcade</Uri>
398-
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
398+
<Sha>92a725aa4d9d6c13dc5229597b51b0b165b8b535</Sha>
399399
<SourceBuild RepoName="arcade" ManagedOnly="true" />
400400
</Dependency>
401-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24272.5">
401+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24314.1">
402402
<Uri>https://github.com/dotnet/arcade</Uri>
403-
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
403+
<Sha>92a725aa4d9d6c13dc5229597b51b0b165b8b535</Sha>
404404
</Dependency>
405-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24272.5">
405+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24314.1">
406406
<Uri>https://github.com/dotnet/arcade</Uri>
407-
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
407+
<Sha>92a725aa4d9d6c13dc5229597b51b0b165b8b535</Sha>
408408
</Dependency>
409-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24272.5">
409+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24314.1">
410410
<Uri>https://github.com/dotnet/arcade</Uri>
411-
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
411+
<Sha>92a725aa4d9d6c13dc5229597b51b0b165b8b535</Sha>
412412
</Dependency>
413-
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="9.0.0-beta.24272.5">
413+
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="9.0.0-beta.24314.1">
414414
<Uri>https://github.com/dotnet/arcade</Uri>
415-
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
415+
<Sha>92a725aa4d9d6c13dc5229597b51b0b165b8b535</Sha>
416416
</Dependency>
417417
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="9.0.0-preview.6.24316.1">
418418
<Uri>https://github.com/dotnet/extensions</Uri>

eng/Versions.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@
161161
<NuGetVersioningVersion>6.2.4</NuGetVersioningVersion>
162162
<NuGetFrameworksVersion>6.2.4</NuGetFrameworksVersion>
163163
<!-- Packages from dotnet/arcade -->
164-
<MicrosoftDotNetBuildTasksInstallersVersion>9.0.0-beta.24272.5</MicrosoftDotNetBuildTasksInstallersVersion>
165-
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.24272.5</MicrosoftDotNetBuildTasksTemplatingVersion>
166-
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.24272.5</MicrosoftDotNetRemoteExecutorVersion>
167-
<MicrosoftSourceBuildIntermediatearcadeVersion>9.0.0-beta.24272.5</MicrosoftSourceBuildIntermediatearcadeVersion>
164+
<MicrosoftDotNetBuildTasksInstallersVersion>9.0.0-beta.24314.1</MicrosoftDotNetBuildTasksInstallersVersion>
165+
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.24314.1</MicrosoftDotNetBuildTasksTemplatingVersion>
166+
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.24314.1</MicrosoftDotNetRemoteExecutorVersion>
167+
<MicrosoftSourceBuildIntermediatearcadeVersion>9.0.0-beta.24314.1</MicrosoftSourceBuildIntermediatearcadeVersion>
168168
<!-- Packages from dotnet/source-build-externals -->
169169
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>9.0.0-alpha.1.24303.2</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
170170
<!-- Packages from dotnet/source-build-reference-packages -->

eng/common/SetupNugetSources.ps1

Lines changed: 71 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
2-
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
1+
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
2+
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
3+
# disabled internal Maestro (darc-int*) feeds.
4+
#
5+
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. This credential
6+
# is added via the standard environment variable VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. See
7+
# https://github.com/microsoft/artifacts-credprovider/tree/v1.1.1?tab=readme-ov-file#environment-variables for more details
38
#
4-
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
5-
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
6-
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
7-
#
8-
# This script needs to be called in every job that will restore packages and which the base repo has
9-
# private AzDO feeds in the NuGet.config.
10-
#
11-
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
12-
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
13-
#
14-
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
9+
# See example call for this script below.
1510
#
1611
# - task: PowerShell@2
17-
# displayName: Setup Private Feeds Credentials
12+
# displayName: Setup Internal Feeds
1813
# condition: eq(variables['Agent.OS'], 'Windows_NT')
1914
# inputs:
2015
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
21-
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
22-
# env:
23-
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
16+
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config
17+
# - task: NuGetAuthenticate@1
18+
#
19+
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
20+
# This ensures that:
21+
# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)
22+
# - The credential provider is installed
23+
#
24+
# This logic is also abstracted into enable-internal-sources.yml.
2425

2526
[CmdletBinding()]
2627
param (
2728
[Parameter(Mandatory = $true)][string]$ConfigFile,
28-
[Parameter(Mandatory = $true)][string]$Password
29+
[string]$Password
2930
)
3031

3132
$ErrorActionPreference = "Stop"
@@ -34,12 +35,23 @@ Set-StrictMode -Version 2.0
3435

3536
. $PSScriptRoot\tools.ps1
3637

38+
$feedEndpoints = $null
39+
40+
# If a credential is provided, ensure that we don't overwrite the current set of
41+
# credentials that may have been provided by a previous call to the credential provider.
42+
if ($Password -and $null -ne $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS) {
43+
$feedEndpoints = $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS | ConvertFrom-Json
44+
} elseif ($Password) {
45+
$feedEndpoints = @{ endpointCredentials = @() }
46+
}
47+
3748
# Add source entry to PackageSources
38-
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
49+
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $pwd) {
3950
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
4051

41-
if ($packageSource -eq $null)
52+
if ($null -eq $packageSource)
4253
{
54+
Write-Host "`tAdding package source" $SourceName
4355
$packageSource = $doc.CreateElement("add")
4456
$packageSource.SetAttribute("key", $SourceName)
4557
$packageSource.SetAttribute("value", $SourceEndPoint)
@@ -48,58 +60,34 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
4860
else {
4961
Write-Host "Package source $SourceName already present."
5062
}
51-
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
52-
}
53-
54-
# Add a credential node for the specified source
55-
function AddCredential($creds, $source, $username, $pwd) {
56-
# Looks for credential configuration for the given SourceName. Create it if none is found.
57-
$sourceElement = $creds.SelectSingleNode($Source)
58-
if ($sourceElement -eq $null)
59-
{
60-
$sourceElement = $doc.CreateElement($Source)
61-
$creds.AppendChild($sourceElement) | Out-Null
62-
}
6363

64-
# Add the <Username> node to the credential if none is found.
65-
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
66-
if ($usernameElement -eq $null)
67-
{
68-
$usernameElement = $doc.CreateElement("add")
69-
$usernameElement.SetAttribute("key", "Username")
70-
$sourceElement.AppendChild($usernameElement) | Out-Null
64+
if ($pwd) {
65+
$feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $SourceEndPoint -pwd $pwd
7166
}
72-
$usernameElement.SetAttribute("value", $Username)
67+
}
7368

74-
# Add the <ClearTextPassword> to the credential if none is found.
75-
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
76-
# -> https://github.com/NuGet/Home/issues/5526
77-
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
78-
if ($passwordElement -eq $null)
79-
{
80-
$passwordElement = $doc.CreateElement("add")
81-
$passwordElement.SetAttribute("key", "ClearTextPassword")
82-
$sourceElement.AppendChild($passwordElement) | Out-Null
69+
# Add a new feed endpoint credential
70+
function AddCredential([array]$endpointCredentials, $source, $pwd) {
71+
$endpointCredentials += @{
72+
endpoint = $source;
73+
password = $pwd
8374
}
84-
85-
$passwordElement.SetAttribute("value", $pwd)
75+
return $endpointCredentials
8676
}
8777

88-
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
89-
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
78+
function InsertMaestroInternalFeedCredentials($Sources, $pwd) {
79+
$maestroInternalSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
9080

91-
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
92-
93-
ForEach ($PackageSource in $maestroPrivateSources) {
94-
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
95-
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
81+
ForEach ($PackageSource in $maestroInternalSources) {
82+
Write-Host "`tAdding credential for Maestro's feed:" $PackageSource.Key
83+
$feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $PackageSource.value -pwd $pwd
9684
}
9785
}
9886

99-
function EnablePrivatePackageSources($DisabledPackageSources) {
100-
$maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
101-
ForEach ($DisabledPackageSource in $maestroPrivateSources) {
102-
Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
87+
function EnableInternalPackageSources($DisabledPackageSources) {
88+
$maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
89+
ForEach ($DisabledPackageSource in $maestroInternalSources) {
90+
Write-Host "`tEnsuring internal source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
10391
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
10492
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
10593
}
@@ -110,58 +98,53 @@ if (!(Test-Path $ConfigFile -PathType Leaf)) {
11098
ExitWithExitCode 1
11199
}
112100

113-
if (!$Password) {
114-
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
115-
ExitWithExitCode 1
116-
}
117-
118101
# Load NuGet.config
119102
$doc = New-Object System.Xml.XmlDocument
120103
$filename = (Get-Item $ConfigFile).FullName
121104
$doc.Load($filename)
122105

123106
# Get reference to <PackageSources> or create one if none exist already
124107
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
125-
if ($sources -eq $null) {
108+
if ($null -eq $sources) {
126109
$sources = $doc.CreateElement("packageSources")
127110
$doc.DocumentElement.AppendChild($sources) | Out-Null
128111
}
129112

130-
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
131-
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
132-
if ($creds -eq $null) {
133-
$creds = $doc.CreateElement("packageSourceCredentials")
134-
$doc.DocumentElement.AppendChild($creds) | Out-Null
135-
}
136-
137113
# Check for disabledPackageSources; we'll enable any darc-int ones we find there
138114
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
139-
if ($disabledSources -ne $null) {
115+
if ($null -ne $disabledSources) {
140116
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
141-
EnablePrivatePackageSources -DisabledPackageSources $disabledSources
117+
EnableInternalPackageSources -DisabledPackageSources $disabledSources
142118
}
143119

144-
$userName = "dn-bot"
145-
146-
# Insert credential nodes for Maestro's private feeds
147-
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password
120+
if ($Password) {
121+
InsertMaestroInternalFeedCredentials -Sources $sources -pwd $Password
122+
}
148123

149124
# 3.1 uses a different feed url format so it's handled differently here
150125
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
151-
if ($dotnet31Source -ne $null) {
152-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
153-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
126+
if ($null -ne $dotnet31Source) {
127+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json" -pwd $Password
128+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json" -pwd $Password
154129
}
155130

156131
$dotnetVersions = @('5','6','7','8')
157132

158133
foreach ($dotnetVersion in $dotnetVersions) {
159134
$feedPrefix = "dotnet" + $dotnetVersion;
160135
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
161-
if ($dotnetSource -ne $null) {
162-
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
163-
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
136+
if ($dotnetSource) {
137+
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedprefix-internal/nuget/v3/index.json" -pwd $Password
138+
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v3/index.json" -pwd $Password
164139
}
165140
}
166141

167-
$doc.Save($filename)
142+
$doc.Save($filename)
143+
144+
# If any credentials were added or altered, update the VSS_NUGET_EXTERNAL_FEED_ENDPOINTS environment variable
145+
if ($null -ne $feedEndpoints) {
146+
# ci is set to true so vso logging commands will be used.
147+
$ci = $true
148+
Write-PipelineSetVariable -Name 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' -Value $($feedEndpoints | ConvertTo-Json) -IsMultiJobVariable $false
149+
Write-PipelineSetVariable -Name 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' -Value "False" -IsMultiJobVariable $false
150+
}

0 commit comments

Comments
 (0)