Skip to content

Commit 32321bb

Browse files
author
Ellis Kenyo
committed
Merge remote-tracking branch 'aspnet/master' into spa-extensions-other
2 parents cd91862 + 59d636f commit 32321bb

File tree

4,937 files changed

+217488
-320367
lines changed

Some content is hidden

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

4,937 files changed

+217488
-320367
lines changed

.azure/pipelines/ci.yml

Lines changed: 282 additions & 90 deletions
Large diffs are not rendered by default.

.azure/pipelines/helix-test.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,38 @@ pr:
1010
jobs:
1111
- template: jobs/default-build.yml
1212
parameters:
13-
jobName: Helix
14-
jobDisplayName: 'Tests: Helix'
13+
jobName: Helix_x64
14+
jobDisplayName: 'Tests: Helix x64'
1515
agentOs: Windows
1616
timeoutInMinutes: 240
1717
steps:
18-
- script: .\build.cmd -all -ci /t:Helix /p:IsHelixJob=true /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\logs\SendToHelix.binlog
18+
- script: .\restore.cmd -ci
19+
displayName: Restore
20+
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
1921
displayName: Run build.cmd helix target
22+
env:
23+
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
2024
artifacts:
2125
- name: Helix_logs
26+
path: artifacts/log/
27+
publishOnError: true
28+
29+
# Build Helix ARM64
30+
- template: jobs/default-build.yml
31+
parameters:
32+
jobName: Helix_arm64
33+
jobDisplayName: "Tests: Helix ARM64"
34+
agentOs: Linux
35+
timeoutInMinutes: 240
36+
steps:
37+
- script: ./restore.sh -ci
38+
displayName: Restore
39+
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
40+
displayName: Run build.sh helix arm64 target
41+
env:
42+
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
43+
installNodeJs: false
44+
artifacts:
45+
- name: Helix_arm64_logs
2246
path: artifacts/logs/
2347
publishOnError: true

.azure/pipelines/jobs/default-build.yml

Lines changed: 85 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# jobDisplayName: string
77
# The friendly job name to display in the UI. Defaults to the name of the OS.
88
# poolName: string
9-
# The name of the VSTS agent queue to use.
9+
# The name of the Azure DevOps agent pool to use.
10+
# poolVmImage: string
11+
# The name of a virtual machine image to use. Primarily of interest when using the Hosted pools.
1012
# agentOs: string
1113
# Used in templates to define variables which are OS specific. Typically from the set { Windows, Linux, macOS }
1214
# buildArgs: string
@@ -28,9 +30,9 @@
2830
# variables: { string: string }
2931
# A map of custom variables
3032
# matrix: { string: { string: string } }
31-
# A map of matrix configurations and variables. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#matrix
33+
# A map of matrix configurations and variables. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job
3234
# dependsOn: string | [ string ]
33-
# For fan-out/fan-in. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#phase
35+
# For fan-out/fan-in. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job
3436
# condition: string
3537
# A condition which can be used to skip the job completely
3638
# codeSign: boolean
@@ -47,6 +49,7 @@
4749
parameters:
4850
agentOs: 'Windows'
4951
poolName: ''
52+
poolVmImage: ''
5053
buildArgs: ''
5154
configuration: 'Release'
5255
beforeBuild: []
@@ -64,7 +67,7 @@ parameters:
6467
buildScript: ''
6568
installNodeJs: true
6669
installJdk: true
67-
timeoutInMinutes: 120
70+
timeoutInMinutes: 180
6871

6972
jobs:
7073
- job: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
@@ -91,25 +94,37 @@ jobs:
9194
${{ if ne(parameters.poolName, '') }}:
9295
name: ${{ parameters.poolName }}
9396
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
97+
${{ if eq(variables['System.TeamProject'], 'public') }}:
98+
name: NetCorePublic-Pool
99+
${{ if ne(parameters.isTestingJob, true) }}:
100+
# Visual Studio Build Tools
101+
queue: BuildPool.Windows.10.Amd64.VS2019.BT.Open
102+
${{ if eq(parameters.isTestingJob, true) }}:
103+
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
104+
queue: BuildPool.Windows.10.Amd64.VS2019.Open
94105
${{ if eq(variables['System.TeamProject'], 'internal') }}:
95-
name: dotnet-internal-vs2019-preview
96-
${{ if ne(variables['System.TeamProject'], 'internal') }}:
97-
name: dotnet-external-vs2019-preview
106+
name: NetCoreInternal-Pool
107+
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
108+
queue: BuildPool.Windows.10.Amd64.VS2019
98109
variables:
99110
AgentOsName: ${{ parameters.agentOs }}
100111
ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping
101-
DOTNET_HOME: $(Agent.BuildDirectory)/.dotnet
112+
DOTNET_HOME: $(Build.SourcesDirectory)/.dotnet
102113
BuildScript: ${{ parameters.buildScript }}
103114
BuildScriptArgs: ${{ parameters.buildArgs }}
104115
BuildConfiguration: ${{ parameters.configuration }}
105116
BuildDirectory: ${{ parameters.buildDirectory }}
117+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
106118
TeamName: AspNetCore
107-
${{ if eq(parameters.agentOs, 'Windows') }}:
108-
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
109-
${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal')) }}:
119+
${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
120+
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk\win-x64
121+
${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}:
110122
_SignType: ''
111-
${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
112-
_SignType: real
123+
${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}:
124+
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
125+
_SignType: real
126+
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
127+
_SignType: test
113128
${{ insert }}: ${{ parameters.variables }}
114129
steps:
115130
- checkout: self
@@ -119,9 +134,21 @@ jobs:
119134
displayName: Install Node 10.x
120135
inputs:
121136
versionSpec: 10.x
137+
- ${{ if eq(parameters.agentOs, 'Windows') }}:
138+
- task: NuGetCommand@2
139+
displayName: 'Clear NuGet caches'
140+
condition: succeeded()
141+
inputs:
142+
command: custom
143+
arguments: 'locals all -clear'
122144
- ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
123-
- powershell: ./eng/scripts/InstallJdk.ps1 '11.0.1'
145+
- powershell: ./eng/scripts/InstallJdk.ps1
124146
displayName: Install JDK 11
147+
- ${{ if eq(parameters.isTestingJob, true) }}:
148+
- powershell: |
149+
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(BuildDirectory)\artifacts\tmp\selenium\"
150+
./eng/scripts/InstallGoogleChrome.ps1
151+
displayName: Install Chrome
125152
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}:
126153
- task: MicroBuildSigningPlugin@1
127154
displayName: Install MicroBuild Signing plugin
@@ -138,13 +165,13 @@ jobs:
138165
- ${{ if eq(parameters.steps, '')}}:
139166
- ${{ if eq(parameters.buildScript, '') }}:
140167
- ${{ if eq(parameters.agentOs, 'Windows') }}:
141-
- script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
168+
- script: .\$(BuildDirectory)\build.cmd -ci /p:DotNetSignType=$(_SignType) -Configuration $(BuildConfiguration) $(BuildScriptArgs)
142169
displayName: Run build.cmd
143170
- ${{ if ne(parameters.agentOs, 'Windows') }}:
144-
- script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
171+
- script: ./$(BuildDirectory)/build.sh -ci -configuration $(BuildConfiguration) $(BuildScriptArgs)
145172
displayName: Run build.sh
146173
- ${{ if ne(parameters.buildScript, '') }}:
147-
- script: $(BuildScript) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
174+
- script: $(BuildScript) -Configuration $(BuildConfiguration) $(BuildScriptArgs)
148175
displayName: run $(BuildScript)
149176

150177
- ${{ parameters.afterBuild }}
@@ -160,15 +187,6 @@ jobs:
160187
continueOnError: true
161188
condition: always()
162189

163-
- task: PublishTestResults@2
164-
displayName: Publish test results
165-
condition: always()
166-
continueOnError: true
167-
inputs:
168-
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
169-
testRunner: vstest
170-
testResultsFiles: '**/artifacts/**/*.trx'
171-
mergeTestResults: true
172190
- ${{ each artifact in parameters.artifacts }}:
173191
- task: PublishBuildArtifacts@1
174192
displayName: Upload artifacts from ${{ artifact.path }}
@@ -186,6 +204,47 @@ jobs:
186204
artifactType: Container
187205
parallel: true
188206

207+
- ${{ if eq(parameters.isTestingJob, true) }}:
208+
- task: PublishTestResults@2
209+
displayName: Publish test results
210+
condition: always()
211+
continueOnError: true
212+
inputs:
213+
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
214+
testRunner: vstest
215+
testResultsFiles: '**/artifacts/**/*.trx'
216+
mergeTestResults: true
217+
buildConfiguration: $(BuildConfiguration)
218+
buildPlatform: $(AgentOsName)
219+
- task: PublishTestResults@2
220+
displayName: Publish test results
221+
condition: always()
222+
continueOnError: true
223+
inputs:
224+
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
225+
testRunner: xunit
226+
testResultsFiles: '**/artifacts/TestResults/**/*.xml'
227+
mergeTestResults: true
228+
buildConfiguration: $(BuildConfiguration)
229+
buildPlatform: $(AgentOsName)
230+
- task: PublishTestResults@2
231+
displayName: Publish js test results
232+
condition: always()
233+
inputs:
234+
testRunner: junit
235+
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
236+
buildConfiguration: $(BuildConfiguration)
237+
buildPlatform: $(AgentOsName)
238+
- task: PublishTestResults@2
239+
displayName: Publish Java test results
240+
condition: always()
241+
inputs:
242+
testRunner: junit
243+
testResultsFiles: '**/TEST-com.microsoft.signalr*.xml'
244+
buildConfiguration: $(BuildConfiguration)
245+
buildPlatform: $(AgentOsName)
246+
247+
189248
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}:
190249
- task: MicroBuildCleanup@1
191250
displayName: Cleanup MicroBuild tasks

.azure/pipelines/signalr-daily-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ jobs:
1414
agentOs: Windows
1515
jobName: SignalRDailyTests
1616
jobDisplayName: "SignalR Daily Tests"
17-
17+
artifacts:
18+
- name: Windows_Logs
19+
path: ../../artifacts/log/
20+
publishOnError: true

src/Servers/IIS/tools/SetupTestEnvironment.ps1 renamed to .azure/pipelines/tools/SetupTestEnvironment.ps1

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
1-
param($Mode)
2-
3-
# TEMP TEMP TEMP
4-
# While doing https://github.com/aspnet/AspNetCore/pull/5705 I accidentally disabled ANCM on CI machines using
5-
# the registy key. Remove it to allow tests to pass
6-
7-
Remove-Item "HKLM:\SOFTWARE\Microsoft\IIS Extensions\IIS AspNetCore Module V2\Parameters" -ErrorAction Ignore;
1+
param(
2+
[string]$Mode,
3+
[string[]]$exes
4+
)
85

96
if (!($DumpFolder))
107
{
11-
$DumpFolder = "$PSScriptRoot\..\..\..\..\artifacts\logs\dumps"
8+
$DumpFolder = "$PSScriptRoot\..\..\..\artifacts\log\dumps"
129
}
1310
if (!(Test-Path $DumpFolder))
1411
{
1512
New-Item $DumpFolder -ItemType Directory;
1613
}
1714
$DumpFolder = Resolve-Path $DumpFolder
1815

19-
$LogsFolder = "$PSScriptRoot\..\artifacts\logs"
20-
if (!(Test-Path $LogsFolder))
21-
{
22-
New-Item $LogsFolder -ItemType Directory;
23-
}
24-
$LogsFolder = Resolve-Path $LogsFolder
25-
2616
$werHive = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting";
2717
$ldHive = "$werHive\LocalDumps";
2818

29-
3019
function Setup-appverif($application)
3120
{
3221
appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application
@@ -70,7 +59,7 @@ function Shutdown-appverif($application)
7059

7160
function Setup-Dumps()
7261
{
73-
if (!(Test-Path $ldHive ))
62+
if (!(Test-Path $ldHive))
7463
{
7564
New-Item -Path $werHive -Name LocalDumps
7665
}
@@ -88,13 +77,13 @@ function Setup-Dumps()
8877

8978
function Shutdown-Dumps()
9079
{
91-
Move-Item $env:windir\System32\_vsjitdebugger.exe $env:windir\System32\vsjitdebugger.exe;
80+
Move-Item $env:windir\System32\_vsjitdebugger.exe $env:windir\System32\vsjitdebugger.exe -ErrorAction Ignore;
9281

9382
Remove-Item $ldHive -Recurse -Force
9483

9584
New-ItemProperty $werHive -Name "DontShowUI" -Value 0 -PropertyType "DWORD" -Force;
9685

97-
$cdb = "c:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe"
86+
$cdb = "${env:ProgramFiles(x86)}\Windows Kits\10\Debuggers\x64\cdb.exe"
9887
if (!(Test-Path $cdb))
9988
{
10089
$downloadedFile = [System.IO.Path]::GetTempFileName();
@@ -116,24 +105,27 @@ function Shutdown-Dumps()
116105

117106
if ($Mode -eq "Setup")
118107
{
119-
Setup-appverif w3wp.exe
120-
Setup-appverif iisexpress.exe
108+
foreach ($element in $exes) {
109+
Setup-appverif $element
110+
}
121111

122112
Setup-Dumps;
123113
}
124114

125115
if ($Mode -eq "SetupDumps")
126116
{
127-
Shutdown-appverif w3wp.exe
128-
Shutdown-appverif iisexpress.exe
117+
foreach ($element in $exes) {
118+
Shutdown-appverif $element
119+
}
129120

130121
Setup-Dumps;
131122
}
132123

133124
if ($Mode -eq "Shutdown")
134125
{
135-
Shutdown-appverif w3wp.exe
136-
Shutdown-appverif iisexpress.exe
126+
foreach ($element in $exes) {
127+
Shutdown-appverif $element
128+
}
137129

138130
Shutdown-Dumps;
139131
}

.editorconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
; EditorConfig to support per-solution formatting.
22
; Use the EditorConfig VS add-in to make this work.
33
; http://editorconfig.org/
4+
;
5+
; Here are some resources for what's supported for .NET/C#
6+
; https://kent-boogaart.com/blog/editorconfig-reference-for-c-developers
7+
; https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2017
8+
;
9+
; Be **careful** editing this because some of the rules don't support adding a severity level
10+
; For instance if you change to `dotnet_sort_system_directives_first = true:warning` (adding `:warning`)
11+
; then the rule will be silently ignored.
412

513
; This is the default for the codeline.
614
root = true
@@ -13,7 +21,7 @@ insert_final_newline = true
1321

1422
[*.cs]
1523
indent_size = 4
16-
dotnet_sort_system_directives_first = true:warning
24+
dotnet_sort_system_directives_first = true
1725

1826
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]
1927
indent_size = 2

.github/CODEOWNERS

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
22
# See https://help.github.com/articles/about-code-owners/
33

4-
/.azure/ @dougbu
5-
/.config/ @dougbu
6-
/build/ @dougbu
7-
/eng/ @dougbu
8-
/src/Components/ @SteveSandersonMS
9-
/src/DefaultBuilder/ @tratcher
10-
/src/Hosting/ @tratcher
11-
/src/Http/ @tratcher @jkotalik
12-
/src/Middleware/ @tratcher
13-
/src/Security/ @tratcher
14-
/src/Servers/ @tratcher @jkotalik
15-
/src/Middleware/Rewrite @jkotalik
16-
/src/Middleware/HttpsPolicy @jkotalik
4+
/global.json @aspnet/build
5+
/.azure/ @aspnet/build
6+
/.config/ @aspnet/build
7+
/build/ @aspnet/build
8+
/eng/ @aspnet/build
9+
/eng/common/ @dotnet-maestro-bot
10+
/eng/Versions.props @dotnet-maestro-bot @dougbu
11+
/eng/Version.Details.xml @dotnet-maestro-bot @dougbu
12+
/src/Components/ @SteveSandersonMS
13+
/src/DefaultBuilder/ @tratcher @anurse
14+
/src/Hosting/ @tratcher @anurse
15+
/src/Http/ @tratcher @jkotalik @anurse
16+
/src/Middleware/ @tratcher @anurse
17+
/src/ProjectTemplates/ @ryanbrandenburg
18+
/src/Security/ @tratcher @anurse
19+
/src/Servers/ @tratcher @jkotalik @anurse @halter73
20+
/src/Middleware/Rewrite @jkotalik @anurse
21+
/src/Middleware/HttpsPolicy @jkotalik @anurse
22+
/src/SignalR/ @mikaelm12 @BrennanConroy @halter73 @anurse

0 commit comments

Comments
 (0)