-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathazure-pipelines-internal-tests.yml
More file actions
780 lines (761 loc) · 38.4 KB
/
Copy pathazure-pipelines-internal-tests.yml
File metadata and controls
780 lines (761 loc) · 38.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
variables:
- name: _BuildConfig
value: Release
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: _PublishUsingPipelines
value: true
- name: _CosmosConnectionUrl
value: https://localhost:8081
- name: _CosmosToken
value: C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
- group: DotNet-HelixApi-Access
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
- name: LC_ALL
value: 'en_US.UTF-8'
- name: LANG
value: 'en_US.UTF-8'
- name: LANGUAGE
value: 'en_US.UTF-8'
- template: /eng/common/templates-official/variables/pool-providers.yml@self
trigger:
batch: true
branches:
include:
- main
- release/*
- feature/*
- internal/release/*
pr: ['*']
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
featureFlags:
autoBaseline: false
autoEnableRoslynWithNewRuleset: false
sdl:
createAdoIssuesForJustificationsForDisablement: false
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
enabled: false
baseline:
baselineFile: $(Build.SourcesDirectory)\.config\guardian\.gdnbaselines
binskim:
preReleaseVersion: '4.3.1'
enabled: false
justificationForDisabling: 'NonProduction'
policheck:
enabled: false
justificationForDisabling: 'NonProduction'
tsa:
enabled: false
justificationForDisabling: 'NonProduction'
antimalwareScan:
enabled: false
justificationForDisabling: 'NonProduction'
prefast:
enabled: false
justificationForDisabling: 'NonProduction'
codeQL:
compiled:
enabled: false
justificationForDisabling: 'NonProduction'
psscriptanalyzer:
enabled: false
justificationForDisabling: 'NonProduction'
credscan:
enabled: false
justificationForDisabling: 'NonProduction'
spmi:
enabled: false
justificationForDisabling: 'NonProduction'
componentgovernance:
enabled: false
justificationForDisabling: 'NonProduction'
eslint:
enabled: false
justificationForDisabling: 'NonProduction'
armory:
enabled: false
justificationForDisabling: 'NonProduction'
customBuildTags:
- ES365AIMigrationTooling
settings:
networkIsolationPolicy: Permissive,CFSClean
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates-official/jobs/jobs.yml@self
parameters:
continueOnError: true
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: false
enablePublishTestResults: true
publishAssetsImmediately: true
isAssetlessBuild: true
enableTelemetry: true
helixRepo: dotnet/efcore
jobs:
- job: Windows
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
timeoutInMinutes: 180
variables:
- _InternalBuildArgs: ''
# Rely on task Arcade injects, not auto-injected build step.
- skipComponentGovernanceDetection: true
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- script: "echo ##vso[build.addbuildtag]daily-build"
condition: and(notin(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
- script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(notin(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs) $(_InternalRuntimeDownloadArgs) /p:CollectCoverage=true /p:SkipApiBaselineTests=true
env:
Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl)
Test__SqlServer__DefaultConnection: "Data Source="
displayName: Build
- script: .dotnet\dotnet test test\EFCore.ApiBaseline.Tests -p:Configuration=$(_BuildConfig)
displayName: Test API Baselines
condition: succeeded()
- powershell: |
$files = Get-ChildItem -Path 'artifacts\coverage' -Filter '*.cobertura.xml' -ErrorAction SilentlyContinue
if ($files) {
$env:PATH += ";$env:USERPROFILE\.dotnet\tools"
dotnet tool update --global dotnet-coverage
if ($LASTEXITCODE -ne 0) { dotnet tool install --global dotnet-coverage }
dotnet-coverage merge -o 'artifacts\coverage\coverage.cobertura.xml' -f cobertura $files.FullName
}
displayName: Merge coverage reports
condition: always()
continueOnError: true
- task: PublishCodeCoverageResults@2
displayName: Publish code coverage
inputs:
summaryFileLocation: artifacts/coverage/coverage.cobertura.xml
condition: always()
continueOnError: true
- job: Windows_SqlServer
displayName: 'Windows SQL Server'
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
timeoutInMinutes: 120
variables:
- skipComponentGovernanceDetection: true
steps:
- powershell: SqlLocalDB start
displayName: Start LocalDB
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- script: eng\common\build.cmd -restore -build -test -ci -configuration $(_BuildConfig) -prepareMachine $(_InternalRuntimeDownloadArgs)
/p:CollectCoverage=true
/p:Projects="$(Build.SourcesDirectory)/test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.SqlServer.HierarchyId.Tests/EFCore.SqlServer.HierarchyId.Tests.csproj;$(Build.SourcesDirectory)/test/EFCore.CrossStore.FunctionalTests/EFCore.CrossStore.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.OData.FunctionalTests/EFCore.OData.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.AspNet.SqlServer.FunctionalTests/EFCore.AspNet.SqlServer.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.VisualBasic.FunctionalTests/EFCore.VisualBasic.FunctionalTests.vbproj;$(Build.SourcesDirectory)/test/EFCore.FSharp.FunctionalTests/EFCore.FSharp.FunctionalTests.fsproj"
displayName: Test SQL Server
- powershell: |
$files = Get-ChildItem -Path 'artifacts\coverage' -Filter '*.cobertura.xml' -ErrorAction SilentlyContinue
if ($files) {
$env:PATH += ";$env:USERPROFILE\.dotnet\tools"
dotnet tool update --global dotnet-coverage
if ($LASTEXITCODE -ne 0) { dotnet tool install --global dotnet-coverage }
dotnet-coverage merge -o 'artifacts\coverage\coverage.cobertura.xml' -f cobertura $files.FullName
}
displayName: Merge coverage reports
condition: always()
continueOnError: true
- task: PublishCodeCoverageResults@2
displayName: Publish code coverage
inputs:
summaryFileLocation: artifacts/coverage/coverage.cobertura.xml
condition: always()
continueOnError: true
- job: macOS
pool:
name: Azure Pipelines
image: macOS-15
os: macOS
variables:
# Rely on task Arcade injects, not auto-injected build step.
- skipComponentGovernanceDetection: true
steps:
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- script: eng/common/build.sh --restore --build --test --pack --ci --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs) /p:CollectCoverage=true /p:SkipApiBaselineTests=true
env:
Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl)
# Work-around for https://github.com/dotnet/runtime/issues/70758
COMPlus_EnableWriteXorExecute: 0
displayName: Build
- bash: |
shopt -s nullglob
files=(artifacts/coverage/*.cobertura.xml)
if [ ${#files[@]} -gt 0 ]; then
export DOTNET_ROOT="$(Build.SourcesDirectory)/.dotnet"
export PATH="$DOTNET_ROOT:$PATH:$HOME/.dotnet/tools"
dotnet tool update --global dotnet-coverage || dotnet tool install --global dotnet-coverage
dotnet-coverage merge -o artifacts/coverage/coverage.cobertura.xml -f cobertura "${files[@]}"
fi
displayName: Merge coverage reports
condition: always()
continueOnError: true
- task: PublishCodeCoverageResults@2
displayName: Publish code coverage
inputs:
summaryFileLocation: artifacts/coverage/coverage.cobertura.xml
condition: always()
continueOnError: true
- job: Linux
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204
os: linux
variables:
# Rely on task Arcade injects, not auto-injected build step.
- skipComponentGovernanceDetection: true
steps:
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- script: eng/common/build.sh --restore --build --test --pack --ci --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs) /p:CollectCoverage=true /p:SkipApiBaselineTests=true
env:
Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl)
displayName: Build
- bash: |
shopt -s nullglob
files=(artifacts/coverage/*.cobertura.xml)
if [ ${#files[@]} -gt 0 ]; then
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet tool update --global dotnet-coverage || dotnet tool install --global dotnet-coverage
dotnet-coverage merge -o artifacts/coverage/coverage.cobertura.xml -f cobertura "${files[@]}"
fi
displayName: Merge coverage reports
condition: always()
continueOnError: true
- task: PublishCodeCoverageResults@2
displayName: Publish code coverage
inputs:
summaryFileLocation: artifacts/coverage/coverage.cobertura.xml
condition: always()
continueOnError: true
templateContext:
sdl:
binskim:
preReleaseVersion: ''
- job: Linux_Cosmos
displayName: 'Linux Cosmos'
condition: notin(variables['Build.Reason'], 'PullRequest', 'Schedule')
timeoutInMinutes: 300
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204
os: linux
variables:
- _runCounter: $[counter(variables['Build.Reason'], 0)]
- skipComponentGovernanceDetection: true
- _CosmosConnectionUrl: 'true'
steps:
- bash: |
echo "##vso[task.setvariable variable=_CosmosConnectionUrl]https://ef-nightly-test.documents.azure.com:443/"
displayName: Prepare to run Cosmos tests on ef-nightly-test
condition: and(eq(variables['_CosmosConnectionUrl'], 'true'), or(endsWith(variables['_runCounter'], '0'), endsWith(variables['_runCounter'], '2'), endsWith(variables['_runCounter'], '4'), endsWith(variables['_runCounter'], '6'), endsWith(variables['_runCounter'], '8')))
- bash: |
echo "##vso[task.setvariable variable=_CosmosConnectionUrl]https://ef-pr-test.documents.azure.com:443/"
displayName: Prepare to run Cosmos tests on ef-pr-test
condition: and(eq(variables['_CosmosConnectionUrl'], 'true'), or(endsWith(variables['_runCounter'], '1'), endsWith(variables['_runCounter'], '3'), endsWith(variables['_runCounter'], '5'), endsWith(variables['_runCounter'], '7'), endsWith(variables['_runCounter'], '9')))
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- script: eng/common/build.sh --restore --build --pack --ci --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs)
displayName: Build
- task: AzureCLI@2
displayName: Run Cosmos tests
inputs:
azureSubscription: EFCosmosTesting
addSpnToEnvironment: true
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
./test.sh --ci --configuration $(_BuildConfig) --projects $(Build.SourcesDirectory)/test/EFCore.Cosmos.FunctionalTests/EFCore.Cosmos.FunctionalTests.csproj /p:CollectCoverage=true
env:
Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl)
Test__Cosmos__UseTokenCredential: true
Test__Cosmos__SubscriptionId: d709b837-4a74-4aec-addc-b6e4b9b23e7e
Test__Cosmos__ResourceGroup: efcosmosci
name: Build
- bash: |
shopt -s nullglob
files=(artifacts/coverage/*.cobertura.xml)
if [ ${#files[@]} -gt 0 ]; then
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet tool update --global dotnet-coverage || dotnet tool install --global dotnet-coverage
dotnet-coverage merge -o artifacts/coverage/coverage.cobertura.xml -f cobertura "${files[@]}"
fi
displayName: Merge coverage reports
condition: always()
continueOnError: true
- task: PublishCodeCoverageResults@2
displayName: Publish code coverage
inputs:
summaryFileLocation: artifacts/coverage/coverage.cobertura.xml
condition: always()
continueOnError: true
templateContext:
sdl:
binskim:
preReleaseVersion: ''
- job: Helix_Windows
displayName: 'Helix Windows'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Windows.10.Amd64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_Windows_SqlServer
displayName: 'Helix Windows SQL Server'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Windows.11.Amd64.Client
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_Windows_Arm64
displayName: 'Helix Windows ARM64'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Windows.11.Arm64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_Windows_Cosmos
displayName: 'Helix Windows Cosmos'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Windows.Server2025.Amd64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_macOS_x64
displayName: 'Helix macOS x64'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: OSX.15.Amd64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_macOS_ARM64
displayName: 'Helix macOS ARM64'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: OSX.15.ARM64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_Ubuntu_SqlServer
displayName: 'Helix Ubuntu SQL Server'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Ubuntu.2204.Amd64.XL@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-sqlserver-amd64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
MSSQL_SA_PASSWORD: "PLACEHOLDERPass$$w0rd"
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_Ubuntu_Cosmos
displayName: 'Helix Ubuntu Cosmos'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Ubuntu.2204.Amd64.XL
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- job: Helix_Ubuntu
displayName: 'Helix Ubuntu'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
- skipComponentGovernanceDetection: true
- name: _HelixBuildConfig
value: $(_BuildConfig)
- name: HelixTargetQueues
value: Ubuntu.2204.Amd64
- name: _HelixAccessToken
value: $(HelixApiAccessToken)
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/core-templates/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 3
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
- script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs)
displayName: Restore packages
- script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)
displayName: Send tests to helix
env:
HelixAccessToken: $(_HelixAccessToken)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- stage: validate
displayName: Validate
dependsOn: build
condition: always()
jobs:
- job: Validate_Job_Results
displayName: Job Results
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-windows-2022
os: windows
variables:
WindowsResult: $[ stageDependencies.build.Windows.result ]
HelixWindowsResult: $[ stageDependencies.build.Helix_Windows.result ]
WindowsSqlServerResult: $[ stageDependencies.build.Windows_SqlServer.result ]
HelixWindowsSqlServerResult: $[ stageDependencies.build.Helix_Windows_SqlServer.result ]
HelixWindowsCosmosResult: $[ stageDependencies.build.Helix_Windows_Cosmos.result ]
LinuxResult: $[ stageDependencies.build.Linux.result ]
HelixUbuntuResult: $[ stageDependencies.build.Helix_Ubuntu.result ]
HelixUbuntuSqlServerResult: $[ stageDependencies.build.Helix_Ubuntu_SqlServer.result ]
MacOsResult: $[ stageDependencies.build.macOS.result ]
HelixMacOsX64Result: $[ stageDependencies.build.Helix_macOS_x64.result ]
HelixMacOsArm64Result: $[ stageDependencies.build.Helix_macOS_ARM64.result ]
HelixWindowsArm64Result: $[ stageDependencies.build.Helix_Windows_Arm64.result ]
LinuxCosmosResult: $[ stageDependencies.build.Linux_Cosmos.result ]
HelixUbuntuCosmosResult: $[ stageDependencies.build.Helix_Ubuntu_Cosmos.result ]
steps:
- pwsh: |
$groupResults = @{
Windows = @("$(WindowsResult)", "$(HelixWindowsResult)")
Linux = @("$(LinuxResult)", "$(HelixUbuntuResult)")
MacOS = @("$(MacOsResult)", "$(HelixMacOsX64Result)")
Arm64 = @("$(HelixWindowsArm64Result)", "$(HelixMacOsArm64Result)")
Cosmos = @("$(HelixWindowsCosmosResult)", "$(LinuxCosmosResult)", "$(HelixUbuntuCosmosResult)")
SqlServer = @("$(WindowsSqlServerResult)", "$(HelixWindowsSqlServerResult)", "$(HelixUbuntuSqlServerResult)")
}
$failedGroups = @()
foreach ($groupName in $groupResults.Keys)
{
$results = $groupResults[$groupName]
Write-Host "$groupName results: $($results -join ', ')"
# Ignore jobs that were skipped (e.g. condition-gated)
$ran = $results | Where-Object { $_ -ne 'Skipped' }
if (-not $ran)
{
Write-Host " -> all jobs skipped, treating group as successful"
continue
}
# Only 'Succeeded' counts as success. 'SucceededWithIssues' is treated as failure
# because the jobs run with continueOnError: true, which maps task failures to warnings.
$hasSuccess = $ran | Where-Object { $_ -eq 'Succeeded' }
if ($hasSuccess)
{
continue
}
$failedGroups += $groupName
}
if ($failedGroups.Count -gt 0)
{
Write-Error "No jobs succeeded for group(s): $($failedGroups -join ', ')."
exit 1
}
Write-Host 'Group validation passed.'
displayName: Evaluate grouped job outcomes