Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Update dependencies from dotnet/arcade #78

Merged
merged 122 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
d9bb310
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 20, 2024
2bdbf5a
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 21, 2024
f3289fd
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 22, 2024
b2a9d6d
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 23, 2024
3210ec7
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 24, 2024
75e2f98
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 25, 2024
bc5e6b7
Update dependencies from https://github.com/dotnet/arcade build
dotnet-maestro[bot] Mar 26, 2024
99f86d3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Mar 27, 2024
c763b45
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Mar 28, 2024
4243636
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Mar 29, 2024
855e658
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Mar 30, 2024
395b000
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Mar 31, 2024
dd09f09
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 1, 2024
46034d5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 3, 2024
192bdf7
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 4, 2024
ec5180c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 5, 2024
29e50f8
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 6, 2024
0ece468
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 7, 2024
5ffe387
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 8, 2024
e61ac81
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 9, 2024
a0ccdb5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 10, 2024
889e262
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 11, 2024
f257e1f
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 12, 2024
5498d6d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 13, 2024
4d71c3c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 14, 2024
31a07c7
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 15, 2024
a6ebda5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 16, 2024
ee8221e
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 17, 2024
23b0bec
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 18, 2024
e34fd5b
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 19, 2024
e79d1b9
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 20, 2024
dc8a86b
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 21, 2024
13ec670
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 22, 2024
43165d0
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 23, 2024
8896b90
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 24, 2024
e4dc002
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 25, 2024
e256dd8
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 26, 2024
31e5511
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 27, 2024
de201c8
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 28, 2024
a970b6d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 29, 2024
0aa1c61
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 30, 2024
f601dec
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Apr 30, 2024
541fd80
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 1, 2024
1326848
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 2, 2024
78e4545
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 3, 2024
f9a0e59
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 4, 2024
52ed51d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 5, 2024
0febbb7
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 6, 2024
6d2ab17
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 7, 2024
8068c3b
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 8, 2024
6f26de4
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 10, 2024
b0c52c3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 11, 2024
3efdc5d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 12, 2024
3ccd85c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 13, 2024
d913116
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 14, 2024
276e9f1
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 15, 2024
aa8f3ef
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 16, 2024
bb764f5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 17, 2024
2c5d98a
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 18, 2024
9e12618
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 19, 2024
62e85ba
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 20, 2024
ffa6f82
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 21, 2024
6dcb772
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 22, 2024
24dbb41
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 23, 2024
1098313
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 24, 2024
81523b4
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 25, 2024
89f2997
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 26, 2024
b60681f
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 27, 2024
030e4c8
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 28, 2024
50bc1be
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 29, 2024
935da80
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 30, 2024
4ffaa87
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] May 31, 2024
6df2078
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 1, 2024
b72c025
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 2, 2024
5022259
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 3, 2024
a270e51
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 4, 2024
23617bb
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 5, 2024
1855737
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 6, 2024
5c40dac
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 7, 2024
731f83c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 8, 2024
a07d7c4
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 9, 2024
a376ac5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 10, 2024
a8d7ee6
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 11, 2024
53b7687
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 12, 2024
ea66265
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 13, 2024
c16f0f9
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 14, 2024
e8bf559
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 15, 2024
a4df57d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 16, 2024
f959acc
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 17, 2024
7717144
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 18, 2024
c6807e9
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 19, 2024
4773198
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 20, 2024
7e88656
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 21, 2024
dc513f7
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 22, 2024
1f9c1a4
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 23, 2024
a34f374
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 24, 2024
35c6351
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 25, 2024
02fcf78
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 26, 2024
52b92b3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 27, 2024
7b75041
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 28, 2024
4129036
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 29, 2024
caf121a
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jun 30, 2024
604edd5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 1, 2024
ffe9443
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 2, 2024
f729d03
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 3, 2024
bfd8b19
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 4, 2024
a99439d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 5, 2024
642c847
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 6, 2024
e42e256
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 7, 2024
9916cea
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 8, 2024
4a4e75d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 9, 2024
34cd65c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 10, 2024
73b836c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 11, 2024
f4ce6a3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 12, 2024
7cfa9d7
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 13, 2024
d8f499e
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 14, 2024
97440cd
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 15, 2024
f9860ac
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 16, 2024
156c402
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 17, 2024
2562308
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 18, 2024
337e687
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jul 19, 2024
f99879f
Update SdkTemplateTests.cs
steveisok Jul 19, 2024
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
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
<Sha>02fe27cd6a9b001c8feb7938e6ef4b3799745759</Sha>
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24065.5">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24368.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0d95a90310e5e2afbef31f4ca1c4b692698cd686</Sha>
<Sha>b4e499d1f6e6b3a981feabfed290d99261762382</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24065.5">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24368.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0d95a90310e5e2afbef31f4ca1c4b692698cd686</Sha>
<Sha>b4e499d1f6e6b3a981feabfed290d99261762382</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24065.5">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24368.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0d95a90310e5e2afbef31f4ca1c4b692698cd686</Sha>
<Sha>b4e499d1f6e6b3a981feabfed290d99261762382</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<!-- Intermediate is necessary for source build. -->
Expand Down
74 changes: 39 additions & 35 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
# disabled internal Maestro (darc-int*) feeds.
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
# See example call for this script below.
#
# - task: PowerShell@2
# displayName: Setup Private Feeds Credentials
Expand All @@ -21,11 +14,18 @@
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
#
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
# This ensures that:
# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)
# - The credential provider is installed.
#
# This logic is also abstracted into enable-internal-sources.yml.

[CmdletBinding()]
param (
[Parameter(Mandatory = $true)][string]$ConfigFile,
[Parameter(Mandatory = $true)][string]$Password
$Password
)

$ErrorActionPreference = "Stop"
Expand All @@ -35,7 +35,7 @@ Set-StrictMode -Version 2.0
. $PSScriptRoot\tools.ps1

# Add source entry to PackageSources
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")

if ($packageSource -eq $null)
Expand All @@ -48,12 +48,17 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
else {
Write-Host "Package source $SourceName already present."
}
AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password

AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
}

# Add a credential node for the specified source
function AddCredential($creds, $source, $username, $password) {
function AddCredential($creds, $source, $username, $pwd) {
# If no cred supplied, don't do anything.
if (!$pwd) {
return;
}

# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
Expand Down Expand Up @@ -82,17 +87,18 @@ function AddCredential($creds, $source, $username, $password) {
$passwordElement.SetAttribute("key", "ClearTextPassword")
$sourceElement.AppendChild($passwordElement) | Out-Null
}
$passwordElement.SetAttribute("value", $Password)

$passwordElement.SetAttribute("value", $pwd)
}

function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")

Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."

ForEach ($PackageSource in $maestroPrivateSources) {
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
}
}

Expand All @@ -110,11 +116,6 @@ if (!(Test-Path $ConfigFile -PathType Leaf)) {
ExitWithExitCode 1
}

if (!$Password) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
ExitWithExitCode 1
}

# Load NuGet.config
$doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
Expand All @@ -127,11 +128,14 @@ if ($sources -eq $null) {
$doc.DocumentElement.AppendChild($sources) | Out-Null
}

# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
$creds = $doc.CreateElement("packageSourceCredentials")
$doc.DocumentElement.AppendChild($creds) | Out-Null
$creds = $null
if ($Password) {
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
$creds = $doc.CreateElement("packageSourceCredentials")
$doc.DocumentElement.AppendChild($creds) | Out-Null
}
}

# Check for disabledPackageSources; we'll enable any darc-int ones we find there
Expand All @@ -144,13 +148,13 @@ if ($disabledSources -ne $null) {
$userName = "dn-bot"

# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password

# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
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 -Password $Password
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
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
}

$dotnetVersions = @('5','6','7','8')
Expand All @@ -159,8 +163,8 @@ foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
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 -Password $Password
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
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
}
}

Expand Down
60 changes: 28 additions & 32 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
#!/usr/bin/env bash

# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
# disabled internal Maestro (darc-int*) feeds.
#
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing.
# See example call for this script below.
#
# - task: Bash@3
# displayName: Setup Private Feeds Credentials
# displayName: Setup Internal Feeds
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# arguments: $(Build.SourcesDirectory)/NuGet.config
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
# - task: NuGetAuthenticate@1
#
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
# This ensures that:
# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)
# - The credential provider is installed.
#
# This logic is also abstracted into enable-internal-sources.yml.

ConfigFile=$1
CredToken=$2
Expand All @@ -48,11 +47,6 @@ if [ ! -f "$ConfigFile" ]; then
ExitWithExitCode 1
fi

if [ -z "$CredToken" ]; then
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
ExitWithExitCode 1
fi

if [[ `uname -s` == "Darwin" ]]; then
NL=$'\\\n'
TB=''
Expand Down Expand Up @@ -140,18 +134,20 @@ PackageSources+="$IFS"
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS

for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding credentials for $FeedName."
if [ "$CredToken" ]; then
for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding credentials for $FeedName."

PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"

sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
fi

# Re-enable any entries in disabledPackageSources where the feed name contains darc-int
grep -i "<disabledPackageSources>" $ConfigFile
Expand Down
6 changes: 3 additions & 3 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Param(
[switch] $pack,
[switch] $publish,
[switch] $clean,
[switch] $verticalBuild,
[switch][Alias('pb')]$productBuild,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
Expand Down Expand Up @@ -59,7 +59,7 @@ function Print-Usage() {
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -clean Clean the solution"
Write-Host " -verticalBuild Run in 'vertical build' infra mode."
Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
Write-Host ""

Write-Host "Advanced settings:"
Expand Down Expand Up @@ -122,7 +122,7 @@ function Build {
/p:Deploy=$deploy `
/p:Test=$test `
/p:Pack=$pack `
/p:ArcadeBuildVertical=$verticalBuild `
/p:DotNetBuildRepo=$productBuild `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
Expand Down
13 changes: 9 additions & 4 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ usage()
echo " --sourceBuild Source-build the solution (short: -sb)"
echo " Will additionally trigger the following actions: --restore, --build, --pack"
echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
echo " Will additionally trigger the following actions: --restore, --build, --pack"
echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution (short: -t)"
echo " --integrationTest Run all integration tests in the solution"
Expand Down Expand Up @@ -59,7 +62,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
restore=false
build=false
source_build=false
vertical_build=false
product_build=false
rebuild=false
test=false
integration_test=false
Expand Down Expand Up @@ -127,12 +130,13 @@ while [[ $# > 0 ]]; do
-sourcebuild|-sb)
build=true
source_build=true
product_build=true
restore=true
pack=true
;;
-verticalbuild|-vb)
-productBuild|-pb)
build=true
vertical_build=true
product_build=true
restore=true
pack=true
;;
Expand Down Expand Up @@ -226,8 +230,9 @@ function Build {
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
/p:DotNetBuildRepo=$product_build \
/p:ArcadeBuildFromSource=$source_build \
/p:ArcadeBuildVertical=$vertical_build \
/p:DotNetBuildSourceOnly=$source_build \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
Expand Down
Loading