@@ -20,39 +20,47 @@ variables:
20
20
- name : TeamName
21
21
value : AspNetCore
22
22
- ${{ if eq(variables['System.TeamProject'], 'public') }} :
23
- - name : BuildScriptArgs
23
+ - name : BuildNumberArg
24
24
value : ' '
25
25
- ${{ if ne(variables['System.TeamProject'], 'public') }} :
26
- - name : BuildScriptArgs
26
+ - name : BuildNumberArg
27
27
value : ' /p:BuildNumber=$(Build.BuildId)'
28
28
- name : SharedFxArgs
29
29
value : ' /t:Prepare
30
30
/t:Restore
31
31
/t:GeneratePropsFiles
32
- /t:BuildSharedFx'
32
+ /t:BuildSharedFx
33
+ $(BuildNumberArg)'
33
34
34
35
jobs :
35
36
- template : jobs/default-build.yml
36
37
parameters :
37
38
jobName : Windows_Build
38
39
jobDisplayName : " Build and test: Windows"
39
40
agentOs : Windows
41
+ buildArgs : $(BuildNumberArg)
40
42
codeSign : true
41
43
beforeBuild :
42
44
- powershell : " & ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1"
43
45
displayName : Setup IISExpress test certificates
44
- # Unix test jobs only run on public CI builds
45
- - ${{ if eq(variables['System.TeamProject'], 'public') }} :
46
+ # Skip tests by default in internal non-PR builds.
47
+ ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
48
+ variables :
49
+ PB_SKIPTESTS : ${{ coalesce(variables.PB_SKIPTESTS, 'true') }}
50
+ # Unix test jobs only run on public CI builds and PRs
51
+ - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
46
52
- template : jobs/default-build.yml
47
53
parameters :
48
54
jobName : MacOs_Build
49
55
jobDisplayName : " Build and test : MacOS"
50
56
agentOs : MacOS
57
+ buildArgs : $(BuildNumberArg)
51
58
- template : jobs/default-build.yml
52
59
parameters :
53
60
jobName : Linux_Build
54
61
jobDisplayName : " Build and test : Linux"
55
62
agentOs : Linux
63
+ buildArgs : $(BuildNumberArg)
56
64
57
65
- ${{ if eq(variables['System.TeamProject'], 'internal') }} :
58
66
- job : Windows_SharedFx
67
75
variables :
68
76
_SignType : real
69
77
JAVA_HOME : $(Agent.BuildDirectory)\.tools\jdk
78
+ PB_SKIPTESTS : ' true'
70
79
steps :
71
80
- checkout : self
72
81
clean : true
@@ -102,7 +111,6 @@ jobs:
102
111
- script : .\build.cmd
103
112
-ci
104
113
/p:SignType=$(_SignType)
105
- $(BuildScriptArgs)
106
114
$(SharedFxArgs)
107
115
/p:SharedFxRID=win-x64
108
116
/bl:artifacts/logs/SharedFx-win-x64.binlog
@@ -118,7 +126,6 @@ jobs:
118
126
- script : .\build.cmd
119
127
-ci
120
128
/p:SignType=$(_SignType)
121
- $(BuildScriptArgs)
122
129
$(SharedFxArgs)
123
130
/p:SharedFxRID=win-x86
124
131
/bl:artifacts/logs/SharedFx-win-x86.binlog
@@ -134,7 +141,7 @@ jobs:
134
141
- script : .\build.cmd
135
142
-ci
136
143
/p:SignType=$(_SignType)
137
- $(BuildScriptArgs )
144
+ $(BuildNumberArg )
138
145
/p:SkipArtifactInfoTargets=true
139
146
/p:DisableSignCheck=true
140
147
/t:DoCodeSigning
@@ -178,6 +185,8 @@ jobs:
178
185
clean : all
179
186
pool :
180
187
vmImage : macOS-10.14
188
+ variables :
189
+ PB_SKIPTESTS : ' true'
181
190
steps :
182
191
- checkout : self
183
192
clean : true
@@ -198,7 +207,6 @@ jobs:
198
207
targetFolder : $(Build.SourcesDirectory)/.deps/
199
208
- script : ./$(BuildDirectory)/build.sh
200
209
-ci
201
- $(BuildScriptArgs)
202
210
$(SharedFxArgs)
203
211
/p:SharedFxRID=osx-x64
204
212
/bl:artifacts/logs/SharedFx-osx-x64.binlog
@@ -226,6 +234,8 @@ jobs:
226
234
clean : all
227
235
pool :
228
236
vmImage : ubuntu-16.04
237
+ variables :
238
+ PB_SKIPTESTS : ' true'
229
239
steps :
230
240
- checkout : self
231
241
clean : true
@@ -246,7 +256,6 @@ jobs:
246
256
targetFolder : $(Build.SourcesDirectory)/.deps/
247
257
- script : ./$(BuildDirectory)/build.sh
248
258
-ci
249
- $(BuildScriptArgs)
250
259
$(SharedFxArgs)
251
260
/p:SharedFXRid=linux-x64
252
261
/bl:artifacts/logs/SharedFx-linux-x64.binlog
@@ -258,7 +267,6 @@ jobs:
258
267
displayName : Build linux-x64 SharedFX
259
268
- script : ./$(BuildDirectory)/build.sh
260
269
-ci
261
- $(BuildScriptArgs)
262
270
$(SharedFxArgs)
263
271
/p:SharedFXRid=linux-arm
264
272
/p:IsLinuxArmSupported=true
@@ -287,6 +295,8 @@ jobs:
287
295
clean : all
288
296
pool :
289
297
vmImage : ubuntu-16.04
298
+ variables :
299
+ PB_SKIPTESTS : ' true'
290
300
steps :
291
301
- checkout : self
292
302
clean : true
@@ -308,7 +318,7 @@ jobs:
308
318
- script : ./$(BuildDirectory)/dockerbuild.sh
309
319
alpine
310
320
-ci
311
- $(BuildScriptArgs )
321
+ $(BuildNumberArg )
312
322
/t:Prepare
313
323
/t:GeneratePropsFiles
314
324
/t:BuildSharedFx
@@ -344,6 +354,7 @@ jobs:
344
354
variables :
345
355
_SignType : real
346
356
JAVA_HOME : $(Agent.BuildDirectory)\.tools\jdk
357
+ PB_SKIPTESTS : ' true'
347
358
steps :
348
359
- checkout : self
349
360
clean : true
@@ -421,6 +432,7 @@ jobs:
421
432
variables :
422
433
_SignType : real
423
434
JAVA_HOME : $(Agent.BuildDirectory)\.tools\jdk
435
+ PB_SKIPTESTS : ' true'
424
436
steps :
425
437
- checkout : self
426
438
clean : true
@@ -443,7 +455,7 @@ jobs:
443
455
targetFolder : $(Build.SourcesDirectory)/.deps/Signed/
444
456
- script : .\build.cmd
445
457
-ci
446
- $(BuildScriptArgs )
458
+ $(BuildNumberArg )
447
459
/p:SignType=$(_SignType)
448
460
/t:BuildFallbackArchive
449
461
/bl:artifacts/logs/PackageArchive.binlog
@@ -468,7 +480,7 @@ jobs:
468
480
469
481
- job : SharedFX_Installers
470
482
displayName : Build SharedFX Installers
471
- dependsOn :
483
+ dependsOn :
472
484
- Linux_SharedFx
473
485
- Linux_Musl_SharedFx
474
486
- MacOs_SharedFx
@@ -478,6 +490,8 @@ jobs:
478
490
clean : all
479
491
pool :
480
492
vmImage : ubuntu-16.04
493
+ variables :
494
+ PB_SKIPTESTS : ' true'
481
495
steps :
482
496
- checkout : self
483
497
clean : true
@@ -531,7 +545,7 @@ jobs:
531
545
targetFolder : $(Build.SourcesDirectory)/.deps/Signed/
532
546
- script : ./$(BuildDirectory)/build.sh
533
547
-ci
534
- $(BuildScriptArgs )
548
+ $(BuildNumberArg )
535
549
/t:BuildInstallers
536
550
/bl:artifacts/logs/SharedFx-Installers.binlog
537
551
env :
@@ -554,7 +568,7 @@ jobs:
554
568
555
569
- job : Publish
556
570
displayName : Publish
557
- dependsOn :
571
+ dependsOn :
558
572
- Windows_Installers
559
573
- SharedFX_Installers
560
574
- Package_Archive
@@ -567,6 +581,7 @@ jobs:
567
581
variables :
568
582
_SignType : real
569
583
JAVA_HOME : $(Agent.BuildDirectory)\.tools\jdk
584
+ PB_SKIPTESTS : ' true'
570
585
steps :
571
586
- checkout : self
572
587
clean : true
@@ -703,7 +718,7 @@ jobs:
703
718
contents : korebuild.json
704
719
- script : .\build.cmd
705
720
-ci
706
- $(BuildScriptArgs )
721
+ $(BuildNumberArg )
707
722
/t:Publish
708
723
/p:BuildBranch=$(Build.SourceBranchName)
709
724
/bl:artifacts/logs/Publish.binlog
0 commit comments