27
27
# A map of custom variables
28
28
# matrix: { string: { string: string } }
29
29
# A map of matrix configurations and variables. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#matrix
30
- # demands: string | [ string ]
31
- # A list of agent demands. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#demands
32
30
# dependsOn: string | [ string ]
33
31
# For fan-out/fan-in. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#phase
34
32
# codeSign: boolean
@@ -45,7 +43,6 @@ parameters:
45
43
poolName : ' '
46
44
buildArgs : ' '
47
45
configuration : ' Release'
48
- demands : []
49
46
beforeBuild : []
50
47
afterBuild : []
51
48
codeSign : false
71
68
maxParallel : 8
72
69
matrix : ${{ parameters.matrix }}
73
70
# Map friendly OS names to the right queue
71
+ # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
74
72
pool :
75
73
${{ if ne(parameters.poolName, '') }} :
76
74
name : ${{ parameters.poolName }}
@@ -81,24 +79,25 @@ jobs:
81
79
name : Hosted Ubuntu 1604
82
80
vmImage : ubuntu-16.04
83
81
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }} :
84
- ${{ if ne(parameters.codeSign, 'true') }} :
85
- name : Hosted VS2017
86
- vmImage : vs2017-win2016
87
- ${{ if eq(parameters.codeSign, 'true') }} :
88
- name : DotNetCore-Windows
82
+ ${{ if eq(variables['System.TeamProject'], 'internal') }} :
83
+ name : dotnet-internal-temp
84
+ ${{ if ne(variables['System.TeamProject'], 'internal') }} :
85
+ name : dotnet-external-temp
89
86
variables :
90
87
AgentOsName : ${{ parameters.agentOs }}
91
88
ASPNETCORE_TEST_LOG_MAXPATH : " 200" # Keep test log file name length low enough for artifact zipping
92
- DOTNET_HOME : $(Agent.WorkFolder)/.dotnet
89
+ DOTNET_HOME : $(Agent.BuildDirectory)/.dotnet
90
+ BuildScript : ${{ parameters.buildScript }}
93
91
BuildScriptArgs : ${{ parameters.buildArgs }}
94
92
BuildConfiguration : ${{ parameters.configuration }}
95
93
BuildDirectory : ${{ parameters.buildDirectory }}
96
- VSTS_OVERWRITE_TEMP : false # Workaround for https://github.com/dotnet/core-eng/issues/2812
97
- ${{ if eq(parameters.codeSign, 'true') }} :
94
+ ${{ if eq(parameters.agentOs, 'Windows') }} :
95
+ JAVA_HOME : $(Agent.BuildDirectory)\.tools\jdk
96
+ ${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal')) }} :
97
+ _SignType :
98
+ ${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal')) }} :
98
99
TeamName : AspNetCore
99
100
_SignType : real
100
- ${{ if ne(parameters.codeSign, 'true') }} :
101
- _SignType :
102
101
${{ insert }} : ${{ parameters.variables }}
103
102
steps :
104
103
- checkout : self
@@ -107,13 +106,17 @@ jobs:
107
106
displayName : Install Node 10.x
108
107
inputs :
109
108
versionSpec : 10.x
110
- - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }} :
109
+ - ${{ if eq(parameters.agentOs, 'Windows') }} :
110
+ - powershell : ./eng/scripts/InstallJdk.ps1 '11.0.1'
111
+ displayName : Install JDK 11
112
+ - ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }} :
111
113
- task : MicroBuildSigningPlugin@1
112
114
displayName : Install MicroBuild Signing plugin
113
115
condition : and(succeeded(), in(variables['_SignType'], 'test', 'real'))
114
116
inputs :
115
117
signType : $(_SignType)
116
118
zipSources : false
119
+ feedSource : https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
117
120
- ${{ parameters.beforeBuild }}
118
121
- ${{ if eq(parameters.agentOs, 'Windows') }} :
119
122
- script : .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
@@ -124,6 +127,7 @@ jobs:
124
127
- task : PublishTestResults@2
125
128
displayName : Publish test results
126
129
condition : always()
130
+ continueOnError : true
127
131
inputs :
128
132
testRunTitle : $(AgentOsName)-$(BuildConfiguration)
129
133
testRunner : vstest
@@ -133,6 +137,7 @@ jobs:
133
137
- task : PublishBuildArtifacts@1
134
138
displayName : Upload artifacts
135
139
condition : eq(variables['system.pullrequest.isfork'], false)
140
+ continueOnError : true
136
141
inputs :
137
142
${{ if eq(parameters.buildDirectory, '') }} :
138
143
pathtoPublish : ${{ parameters.artifacts.path }}
@@ -145,7 +150,7 @@ jobs:
145
150
artifactType : Container
146
151
parallel : true
147
152
- ${{ parameters.afterBuild }}
148
- - ${{ if and(eq(parameters.agentOs , 'Windows '), eq(parameters.codeSign , 'true ')) }} :
153
+ - ${{ if and(eq(variables['System.TeamProject'] , 'internal '), eq(parameters.agentOs , 'Windows ')) }} :
149
154
- task : MicroBuildCleanup@1
150
155
displayName : Cleanup MicroBuild tasks
151
156
condition : always()
0 commit comments