6
6
# jobDisplayName: string
7
7
# The friendly job name to display in the UI. Defaults to the name of the OS.
8
8
# 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.
10
12
# agentOs: string
11
13
# Used in templates to define variables which are OS specific. Typically from the set { Windows, Linux, macOS }
12
14
# buildArgs: string
28
30
# variables: { string: string }
29
31
# A map of custom variables
30
32
# 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
32
34
# 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
34
36
# condition: string
35
37
# A condition which can be used to skip the job completely
36
38
# codeSign: boolean
47
49
parameters :
48
50
agentOs : ' Windows'
49
51
poolName : ' '
52
+ poolVmImage : ' '
50
53
buildArgs : ' '
51
54
configuration : ' Release'
52
55
beforeBuild : []
@@ -64,7 +67,7 @@ parameters:
64
67
buildScript : ' '
65
68
installNodeJs : true
66
69
installJdk : true
67
- timeoutInMinutes : 120
70
+ timeoutInMinutes : 180
68
71
69
72
jobs :
70
73
- job : ${{ coalesce(parameters.jobName, parameters.agentOs) }}
@@ -91,25 +94,37 @@ jobs:
91
94
${{ if ne(parameters.poolName, '') }} :
92
95
name : ${{ parameters.poolName }}
93
96
${{ 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
94
105
${{ 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
98
109
variables :
99
110
AgentOsName : ${{ parameters.agentOs }}
100
111
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
102
113
BuildScript : ${{ parameters.buildScript }}
103
114
BuildScriptArgs : ${{ parameters.buildArgs }}
104
115
BuildConfiguration : ${{ parameters.configuration }}
105
116
BuildDirectory : ${{ parameters.buildDirectory }}
117
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
106
118
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')) }} :
110
122
_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
113
128
${{ insert }} : ${{ parameters.variables }}
114
129
steps :
115
130
- checkout : self
@@ -119,9 +134,21 @@ jobs:
119
134
displayName : Install Node 10.x
120
135
inputs :
121
136
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'
122
144
- ${{ 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
124
146
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
125
152
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }} :
126
153
- task : MicroBuildSigningPlugin@1
127
154
displayName : Install MicroBuild Signing plugin
@@ -138,13 +165,13 @@ jobs:
138
165
- ${{ if eq(parameters.steps, '')}} :
139
166
- ${{ if eq(parameters.buildScript, '') }} :
140
167
- ${{ 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)
142
169
displayName : Run build.cmd
143
170
- ${{ if ne(parameters.agentOs, 'Windows') }} :
144
- - script : ./$(BuildDirectory)/build.sh -ci -p:Configuration= $(BuildConfiguration) $(BuildScriptArgs)
171
+ - script : ./$(BuildDirectory)/build.sh -ci -configuration $(BuildConfiguration) $(BuildScriptArgs)
145
172
displayName : Run build.sh
146
173
- ${{ if ne(parameters.buildScript, '') }} :
147
- - script : $(BuildScript) /p: Configuration= $(BuildConfiguration) $(BuildScriptArgs)
174
+ - script : $(BuildScript) - Configuration $(BuildConfiguration) $(BuildScriptArgs)
148
175
displayName : run $(BuildScript)
149
176
150
177
- ${{ parameters.afterBuild }}
@@ -160,15 +187,6 @@ jobs:
160
187
continueOnError : true
161
188
condition : always()
162
189
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
172
190
- ${{ each artifact in parameters.artifacts }} :
173
191
- task : PublishBuildArtifacts@1
174
192
displayName : Upload artifacts from ${{ artifact.path }}
@@ -186,6 +204,47 @@ jobs:
186
204
artifactType : Container
187
205
parallel : true
188
206
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
+
189
248
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }} :
190
249
- task : MicroBuildCleanup@1
191
250
displayName : Cleanup MicroBuild tasks
0 commit comments