Skip to content

Commit 83d73f7

Browse files
committed
Merge branch 'rel/17.10' of https://github.com/microsoft/vstest into rel/17.10
2 parents d170364 + 2eaee54 commit 83d73f7

File tree

91 files changed

+2811
-3906
lines changed

Some content is hidden

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

91 files changed

+2811
-3906
lines changed

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
</Dependency>
4545
</ProductDependencies>
4646
<ToolsetDependencies>
47-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24266.1">
47+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24270.3">
4848
<Uri>https://github.com/dotnet/arcade</Uri>
49-
<Sha>ed14da5934ffb536cff8f41f8b5719334524cbed</Sha>
49+
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
5050
</Dependency>
5151
<!-- Intermediate is necessary for source build. -->
52-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24266.1">
52+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24270.3">
5353
<Uri>https://github.com/dotnet/arcade</Uri>
54-
<Sha>ed14da5934ffb536cff8f41f8b5719334524cbed</Sha>
54+
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
5555
<SourceBuild RepoName="arcade" ManagedOnly="true" />
5656
</Dependency>
5757
<Dependency Name="Microsoft.DiaSymReader.Pdb2Pdb" Version="1.1.0-beta2-19575-01">
@@ -62,9 +62,9 @@
6262
<Uri>https://github.com/dotnet/symreader-converter</Uri>
6363
<Sha>c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0</Sha>
6464
</Dependency>
65-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24266.1">
65+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24270.3">
6666
<Uri>https://github.com/dotnet/arcade</Uri>
67-
<Sha>ed14da5934ffb536cff8f41f8b5719334524cbed</Sha>
67+
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
6868
</Dependency>
6969
</ToolsetDependencies>
7070
</Dependencies>

eng/Versions.props

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<VersionPrefix>17.10.0</VersionPrefix>
1212
<PreReleaseVersionLabel>release</PreReleaseVersionLabel>
1313
</PropertyGroup>
14-
1514
<PropertyGroup Label="Arcade settings">
1615
<!-- Ensure we use xliff task tool - true is the default but we make it explicit here -->
1716
<UsingToolXliff>true</UsingToolXliff>

eng/common/SetupNugetSources.ps1

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
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
3+
#
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
15+
#
16+
# - task: PowerShell@2
17+
# displayName: Setup Private Feeds Credentials
18+
# condition: eq(variables['Agent.OS'], 'Windows_NT')
19+
# inputs:
20+
# 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)
24+
25+
[CmdletBinding()]
26+
param (
27+
[Parameter(Mandatory = $true)][string]$ConfigFile,
28+
[Parameter(Mandatory = $true)][string]$Password
29+
)
30+
31+
$ErrorActionPreference = "Stop"
32+
Set-StrictMode -Version 2.0
33+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
34+
35+
. $PSScriptRoot\tools.ps1
36+
37+
# Add source entry to PackageSources
38+
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
39+
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
40+
41+
if ($packageSource -eq $null)
42+
{
43+
$packageSource = $doc.CreateElement("add")
44+
$packageSource.SetAttribute("key", $SourceName)
45+
$packageSource.SetAttribute("value", $SourceEndPoint)
46+
$sources.AppendChild($packageSource) | Out-Null
47+
}
48+
else {
49+
Write-Host "Package source $SourceName already present."
50+
}
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+
}
63+
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
71+
}
72+
$usernameElement.SetAttribute("value", $Username)
73+
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
83+
}
84+
85+
$passwordElement.SetAttribute("value", $pwd)
86+
}
87+
88+
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
89+
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
90+
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
96+
}
97+
}
98+
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"
103+
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
104+
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
105+
}
106+
}
107+
108+
if (!(Test-Path $ConfigFile -PathType Leaf)) {
109+
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
110+
ExitWithExitCode 1
111+
}
112+
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+
118+
# Load NuGet.config
119+
$doc = New-Object System.Xml.XmlDocument
120+
$filename = (Get-Item $ConfigFile).FullName
121+
$doc.Load($filename)
122+
123+
# Get reference to <PackageSources> or create one if none exist already
124+
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
125+
if ($sources -eq $null) {
126+
$sources = $doc.CreateElement("packageSources")
127+
$doc.DocumentElement.AppendChild($sources) | Out-Null
128+
}
129+
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+
137+
# Check for disabledPackageSources; we'll enable any darc-int ones we find there
138+
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
139+
if ($disabledSources -ne $null) {
140+
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
141+
EnablePrivatePackageSources -DisabledPackageSources $disabledSources
142+
}
143+
144+
$userName = "dn-bot"
145+
146+
# Insert credential nodes for Maestro's private feeds
147+
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password
148+
149+
# 3.1 uses a different feed url format so it's handled differently here
150+
$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
154+
}
155+
156+
$dotnetVersions = @('5','6','7','8')
157+
158+
foreach ($dotnetVersion in $dotnetVersions) {
159+
$feedPrefix = "dotnet" + $dotnetVersion;
160+
$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
164+
}
165+
}
166+
167+
$doc.Save($filename)

eng/common/build.ps1

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Param(
1919
[switch] $pack,
2020
[switch] $publish,
2121
[switch] $clean,
22-
[switch] $verticalBuild,
2322
[switch][Alias('pb')]$productBuild,
2423
[switch][Alias('bl')]$binaryLog,
2524
[switch][Alias('nobl')]$excludeCIBinarylog,
@@ -60,7 +59,6 @@ function Print-Usage() {
6059
Write-Host " -sign Sign build outputs"
6160
Write-Host " -publish Publish artifacts (e.g. symbols)"
6261
Write-Host " -clean Clean the solution"
63-
Write-Host " -verticalBuild Run in 'vertical build' infra mode."
6462
Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
6563
Write-Host ""
6664

@@ -124,8 +122,7 @@ function Build {
124122
/p:Deploy=$deploy `
125123
/p:Test=$test `
126124
/p:Pack=$pack `
127-
/p:DotNetBuildRepo=$($productBuild -or $verticalBuild) `
128-
/p:ArcadeBuildVertical=$verticalBuild `
125+
/p:DotNetBuildRepo=$productBuild `
129126
/p:IntegrationTest=$integrationTest `
130127
/p:PerformanceTest=$performanceTest `
131128
/p:Sign=$sign `

eng/common/build.sh

-9
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
6262
restore=false
6363
build=false
6464
source_build=false
65-
vertical_build=false
6665
product_build=false
6766
rebuild=false
6867
test=false
@@ -141,13 +140,6 @@ while [[ $# > 0 ]]; do
141140
restore=true
142141
pack=true
143142
;;
144-
-verticalbuild|-vb)
145-
build=true
146-
vertical_build=true
147-
product_build=true
148-
restore=true
149-
pack=true
150-
;;
151143
-test|-t)
152144
test=true
153145
;;
@@ -241,7 +233,6 @@ function Build {
241233
/p:DotNetBuildRepo=$product_build \
242234
/p:ArcadeBuildFromSource=$source_build \
243235
/p:DotNetBuildSourceOnly=$source_build \
244-
/p:ArcadeBuildVertical=$vertical_build \
245236
/p:Rebuild=$rebuild \
246237
/p:Test=$test \
247238
/p:Pack=$pack \

0 commit comments

Comments
 (0)