Skip to content

Commit 50d914f

Browse files
author
John Luo
committed
Merge branch 'master' into johluo/tooling-consolidation-fixup
2 parents 50f3a16 + 9d7ce5e commit 50d914f

File tree

127 files changed

+8389
-6101
lines changed

Some content is hidden

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

127 files changed

+8389
-6101
lines changed

.azure/pipelines/ci.yml

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pr:
1919
- '*'
2020

2121
variables:
22-
- name: DOTNET_CLI_HOME
23-
value: $(Agent.BuildDirectory)
2422
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
2523
value: true
2624
- name: _TeamName
@@ -626,7 +624,6 @@ stages:
626624
# Helix x64
627625
- template: jobs/default-build.yml
628626
parameters:
629-
condition: in(variables['Build.Reason'], 'PullRequest')
630627
jobName: Helix_x64
631628
jobDisplayName: 'Tests: Helix x64'
632629
agentOs: Windows
@@ -648,54 +645,6 @@ stages:
648645
publishOnError: true
649646
includeForks: true
650647

651-
- template: jobs/default-build.yml
652-
parameters:
653-
condition: notin(variables['Build.Reason'], 'PullRequest')
654-
jobName: Helix_x64_daily
655-
jobDisplayName: 'Tests: Helix x64 Daily'
656-
agentOs: Windows
657-
timeoutInMinutes: 180
658-
steps:
659-
# Build the shared framework
660-
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
661-
displayName: Build shared fx
662-
- script: .\restore.cmd -ci -nobl /p:BuildInteropProjects=true
663-
displayName: Restore interop projects
664-
- script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
665-
displayName: Run build.cmd helix target
666-
env:
667-
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
668-
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
669-
artifacts:
670-
- name: Helix_logs
671-
path: artifacts/log/
672-
publishOnError: true
673-
includeForks: true
674-
675-
# Helix ARM64
676-
- template: jobs/default-build.yml
677-
parameters:
678-
condition: and(eq(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))
679-
jobName: Helix_arm64_daily
680-
jobDisplayName: "Tests: Helix ARM64 Daily"
681-
agentOs: Linux
682-
timeoutInMinutes: 180
683-
steps:
684-
# Build the shared framework
685-
- script: ./restore.sh -ci -nobl
686-
displayName: Restore
687-
- script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
688-
displayName: Run build.sh helix arm64 target
689-
env:
690-
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
691-
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
692-
installNodeJs: false
693-
artifacts:
694-
- name: Helix_arm64_logs
695-
path: artifacts/log/
696-
publishOnError: true
697-
includeForks: true
698-
699648
# Source build
700649
- job: Source_Build
701650
displayName: 'Test: Linux Source Build'
@@ -704,14 +653,16 @@ stages:
704653
vmImage: 'ubuntu-16.04'
705654
variables:
706655
DotNetCoreSdkDir: $(Agent.ToolsDirectory)/dotnet
656+
# This isn't needed in the path because build does not need to _use_ global tools.
657+
DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
707658
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
708659
steps:
709660
- script: |
710661
source eng/common/native/common-library.sh
711-
mkdir -p $HOME/bin
712-
GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $HOME/bin/jq
713-
chmod +x $HOME/bin/jq
714-
echo "##vso[task.prependpath]$HOME/bin"
662+
mkdir -p $(System.DefaultWorkingDirectory)/.tools
663+
GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $(System.DefaultWorkingDirectory)/.tools/jq
664+
chmod +x $(System.DefaultWorkingDirectory)/.tools/jq
665+
echo "##vso[task.prependpath]$(System.DefaultWorkingDirectory)/.tools"
715666
displayName: Install jq
716667
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
717668
- task: Bash@3

.azure/pipelines/devBuilds.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ stages:
2929
jobDisplayName: "Build: Components"
3030
agentOs: Windows
3131
steps:
32-
- script: git submodule init
33-
- script: git submodule update --recursive
3432
- script: ./build.cmd
3533
-ci
3634
-arch x64
@@ -54,8 +52,6 @@ stages:
5452
jobDisplayName: "Build: Servers"
5553
agentOs: Windows
5654
steps:
57-
- script: git submodule init
58-
- script: git submodule update --recursive
5955
- script: ./build.cmd
6056
-ci
6157
-arch x64
@@ -79,8 +75,6 @@ stages:
7975
jobDisplayName: "Build: Project Templates"
8076
agentOs: Windows
8177
steps:
82-
- script: git submodule init
83-
- script: git submodule update --recursive
8478
- script: ./build.cmd
8579
-ci
8680
-arch x64
@@ -104,8 +98,6 @@ stages:
10498
jobDisplayName: "Build: Everything"
10599
agentOs: Windows
106100
steps:
107-
- script: git submodule init
108-
- script: git submodule update --recursive
109101
- script: ./build.cmd
110102
-ci
111103
-arch x64

.azure/pipelines/helix-matrix.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# We only want to run full helix matrix on master
2+
pr: none
3+
trigger: none
4+
schedules:
5+
- cron: "0 */12 * * *"
6+
branches:
7+
include:
8+
- master
9+
always: true
10+
11+
variables:
12+
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
13+
- name: _UseHelixOpenQueues
14+
value: 'true'
15+
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
16+
- group: DotNet-HelixApi-Access
17+
- name: _UseHelixOpenQueues
18+
value: 'false'
19+
20+
jobs:
21+
- template: jobs/default-build.yml
22+
parameters:
23+
jobName: Helix_matrix_x64
24+
jobDisplayName: 'Tests: Helix full matrix x64'
25+
agentOs: Windows
26+
timeoutInMinutes: 240
27+
steps:
28+
# Build the shared framework
29+
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
30+
displayName: Build shared fx
31+
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
32+
displayName: Restore interop projects
33+
- script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixDaily=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
34+
displayName: Run build.cmd helix target
35+
env:
36+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
37+
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
38+
artifacts:
39+
- name: Helix_logs
40+
path: artifacts/log/
41+
publishOnError: true
42+
43+
# Helix ARM64
44+
- template: jobs/default-build.yml
45+
parameters:
46+
jobName: Helix_matrix_arm64
47+
jobDisplayName: "Tests: Helix ARM64 matrix"
48+
agentOs: Linux
49+
timeoutInMinutes: 180
50+
steps:
51+
- script: ./restore.sh -ci -nobl
52+
displayName: Restore
53+
- script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
54+
displayName: Run build.sh helix arm64 target
55+
env:
56+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
57+
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
58+
installNodeJs: false
59+
artifacts:
60+
- name: Helix_arm64_logs
61+
path: artifacts/log/
62+
publishOnError: true
63+
includeForks: true

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

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ parameters:
5252
condition: ''
5353
# jobName: '' - use agentOs by default.
5454
# jobDisplayName: '' - use agentOs by default.
55-
artifacts: []
55+
artifacts: []
5656
buildDirectory: ''
5757
buildScript: ''
5858
installTar: true
@@ -80,7 +80,7 @@ jobs:
8080
enableMicrobuild: true
8181
enablePublishBuildAssets: true
8282
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
83-
enablePublishTestResults: true # publish test results to AzDO (populates AzDO Tests tab)
83+
enablePublishTestResults: ${{ eq(parameters.isTestingJob, 'true') }} # publish test results to AzDO (populates AzDO Tests tab)
8484
enableTelemetry: true
8585
helixRepo: dotnet/aspnetcore
8686
helixType: build.product/
@@ -116,12 +116,13 @@ jobs:
116116
- BuildScriptArgs: ${{ parameters.buildArgs }}
117117
- _BuildConfig: ${{ parameters.configuration }}
118118
- BuildConfiguration: ${{ parameters.configuration }}
119-
- BuildDirectory: ${{ parameters.buildDirectory }}
120-
- DOTNET_CLI_HOME: $(Agent.BuildDirectory)
119+
- ${{ if eq(parameters.buildDirectory, '') }}:
120+
- BuildDirectory: $(System.DefaultWorkingDirectory)
121+
- ${{ if ne(parameters.buildDirectory, '') }}:
122+
- BuildDirectory: ${{ parameters.buildDirectory }}
123+
- DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
121124
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
122125
- TeamName: AspNetCore
123-
- ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
124-
- JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk\win-x64
125126
- ${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}:
126127
- _SignType: ''
127128
- ${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}:
@@ -164,6 +165,12 @@ jobs:
164165
- ${{ if and(eq(parameters.installTar, 'true'), eq(parameters.agentOs, 'Windows')) }}:
165166
- powershell: ./eng/scripts/InstallTar.ps1
166167
displayName: Find or install Tar
168+
- ${{ if eq(parameters.agentOs, 'Windows') }}:
169+
- powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools"
170+
displayName: Add dotnet tools to path
171+
- ${{ if ne(parameters.agentOs, 'Windows') }}:
172+
- script: echo "##vso[task.prependpath]$(DOTNET_CLI_HOME)/.dotnet/tools"
173+
displayName: Add dotnet tools to path
167174

168175
- ${{ parameters.beforeBuild }}
169176

@@ -191,10 +198,10 @@ jobs:
191198
- ${{ if eq(parameters.steps, '')}}:
192199
- ${{ if eq(parameters.buildScript, '') }}:
193200
- ${{ if eq(parameters.agentOs, 'Windows') }}:
194-
- script: .\$(BuildDirectory)\build.cmd -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) /p:DotNetSignType=$(_SignType)
201+
- script: $(BuildDirectory)\build.cmd -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) /p:DotNetSignType=$(_SignType)
195202
displayName: Run build.cmd
196203
- ${{ if ne(parameters.agentOs, 'Windows') }}:
197-
- script: ./$(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs)
204+
- script: $(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs)
198205
displayName: Run build.sh
199206
- ${{ if ne(parameters.buildScript, '') }}:
200207
- script: $(BuildScript) -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs)
@@ -232,29 +239,15 @@ jobs:
232239
condition: and(or(succeeded(), eq('${{ artifact.publishOnError }}', 'true')), or(eq(variables['system.pullrequest.isfork'], false), eq('${{ artifact.includeForks }}', 'true')))
233240
continueOnError: true
234241
inputs:
235-
${{ if eq(parameters.buildDirectory, '') }}:
236-
pathtoPublish: ${{ artifact.path }}
237-
${{ if ne(parameters.buildDirectory, '') }}:
238-
pathtoPublish: ${{ parameters.buildDirectory }}\${{ artifact.path }}
242+
pathtoPublish: $(BuildDirectory)/${{ artifact.path }}
239243
${{ if eq(artifact.name, '') }}:
240244
artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration)
241245
${{ if ne(artifact.name, '') }}:
242246
artifactName: ${{ artifact.name }}
243247
artifactType: Container
244248
parallel: true
245249

246-
- ${{ if eq(parameters.isTestingJob, true) }}:
247-
- task: PublishTestResults@2
248-
displayName: Publish VSTest test results
249-
condition: always()
250-
continueOnError: true
251-
inputs:
252-
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
253-
testRunner: vstest
254-
testResultsFiles: '**/artifacts/**/*.trx'
255-
mergeTestResults: true
256-
buildConfiguration: $(BuildConfiguration)
257-
buildPlatform: $(AgentOsName)
250+
- ${{ if and(eq(parameters.isTestingJob, true), ne(parameters.jobName, 'Windows_Templates_Test')) }}:
258251
- task: PublishTestResults@2
259252
displayName: Publish js test results
260253
condition: always()
@@ -263,12 +256,3 @@ jobs:
263256
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
264257
buildConfiguration: $(BuildConfiguration)
265258
buildPlatform: $(AgentOsName)
266-
- task: PublishTestResults@2
267-
displayName: Publish Java test results
268-
condition: always()
269-
inputs:
270-
testRunner: junit
271-
testResultsFiles: '**/TEST-junit-jupiter.xml'
272-
buildConfiguration: $(BuildConfiguration)
273-
buildPlatform: $(AgentOsName)
274-
mergeTestResults: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Issue with .NET runtime or core .NET libraries
4+
url: https://github.com/dotnet/runtime/issues/new/choose
5+
about: Please open issues relating to the .NET runtime or core .NET libraries in dotnet/runtime.
6+
- name: Issue with .NET SDK
7+
url: https://github.com/dotnet/sdk/issues/new/choose
8+
about: Please open issues relating to the .NET SDK itself in dotnet/sdk.
9+
- name: Issue with Entity Framework Core
10+
url: https://github.com/dotnet/efcore/issues/new/choose
11+
about: Please open issues relating to Entity Framework Core in dotnet/efcore.
12+
- name: Issue with Roslyn compiler
13+
url: https://github.com/dotnet/roslyn/issues/new/choose
14+
about: Please open issues relating to the Roslyn .NET compiler in dotnet/roslyn.

NuGet.config

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
65
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
6+
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
77
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
88
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
99
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
1010
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
11-
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
12-
<add key="aspnetcore-tools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
1311
<add key="roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
1412
<!-- Used for the SiteExtension 3.1 bits that are included in the 5.0 build -->
1513
<add key="dotnet31-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json" />

build.ps1

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ $RunRestore = if ($NoRestore) { $false }
253253
# Target selection
254254
$MSBuildArguments += "/p:Restore=$RunRestore"
255255
$MSBuildArguments += "/p:Build=$RunBuild"
256-
if (-not $RunBuild) {
257-
$MSBuildArguments += "/p:NoBuild=true"
258-
}
256+
if (-not $RunBuild) { $MSBuildArguments += "/p:NoBuild=true" }
259257
$MSBuildArguments += "/p:Pack=$Pack"
260258
$MSBuildArguments += "/p:Test=$Test"
261259
$MSBuildArguments += "/p:Sign=$Sign"
@@ -364,18 +362,23 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore
364362
# Import Arcade
365363
. "$PSScriptRoot/eng/common/tools.ps1"
366364

365+
# Add default .binlog location if not already on the command line. tools.ps1 does not handle this; it just checks
366+
# $BinaryLog, $CI and $ExcludeCIBinarylog values for an error case. But tools.ps1 provides a nice function to help.
367+
if ($BinaryLog) {
368+
$bl = GetMSBuildBinaryLogCommandLineArgument($MSBuildArguments)
369+
if (-not $bl) {
370+
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
371+
}
372+
} elseif ($CI) {
373+
# Ensure the artifacts/log directory isn't empty to avoid warnings.
374+
New-Item (Join-Path $LogDir "empty.log") -ItemType File -ErrorAction SilentlyContinue >$null
375+
}
376+
367377
# Capture MSBuild crash logs
368378
$env:MSBUILDDEBUGPATH = $LogDir
369379

370380
$local:exit_code = $null
371381
try {
372-
# Import custom tools configuration, if present in the repo.
373-
# Note: Import in global scope so that the script set top-level variables without qualification.
374-
$configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
375-
if (Test-Path $configureToolsetScript) {
376-
. $configureToolsetScript
377-
}
378-
379382
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
380383
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
381384
# the toolset is a better default behavior.

0 commit comments

Comments
 (0)