Repository navigation
Expand file tree
/
Copy pathdotnet-sqlclient-ci-core.yml
More file actions
791 lines (735 loc) · 34.2 KB
/
Copy pathdotnet-sqlclient-ci-core.yml
File metadata and controls
791 lines (735 loc) · 34.2 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
781
782
783
784
785
786
787
788
789
790
791
#################################################################################
# Licensed to the .NET Foundation under one or more agreements. #
# The .NET Foundation licenses this file to you under the MIT license. #
# See the LICENSE file in the project root for more information. #
#################################################################################
parameters:
# True to emit debug information and steps.
- name: debug
type: boolean
default: false
# The target frameworks to build and run tests for on Windows.
#
# These are _not_ the target frameworks to build the driver packages for.
#
- name: targetFrameworks
type: object
default: [net462, net10.0]
# The target frameworks to build and run tests for on Unix.
#
# These are _not_ the target frameworks to build the driver packages for.
#
- name: targetFrameworksUnix
type: object
default: [net10.0]
# The target frameworks to build and run tests for on Windows, for the
# primary test configurations (local SQL Server 2025 and Azure SQL).
#
- name: primaryTargetFrameworks
type: object
default: [net462, net10.0]
# The target frameworks to build and run tests for on Unix, for the primary
# test configurations (local SQL Server 2025 and Azure SQL).
- name: primaryTargetFrameworksUnix
type: object
default: [net10.0]
# Netcore Version for Test Utilities
- name: netcoreVersionTestUtils
type: object
default: net10.0
# Build Platforms on Windows
- name: buildPlatforms
type: object
default: [AnyCPU]
# Test sets to run
- name: testSets
type: object
default: [1, 2, 3]
# Use Managed/Native SNI on Windows; valid values are:
# [true, false]
# [false, true]
# [false]
# [true]
- name: useManagedSNI
type: object
default: [false, true]
# SNI Version Override
- name: SNIVersion
type: string
default: ""
# SNI Version Override Nuget Feed
- name: SNIValidationFeed
type: string
default: https://sqlclientdrivers.pkgs.visualstudio.com/ADO.Net/_packaging/SNIValidation/nuget/v3/index.json
# The C# project reference type to use when building and packing the packages.
- name: referenceType
type: string
values:
# Reference sibling packages as NuGet packages.
- Package
# Reference sibling packages as C# projects.
- Project
- name: buildConfiguration
type: string
values:
- Debug
- Release
# The name of the general-purpose 1ES pool that most CI jobs run in.
#
# This is the single place in the CI pipelines where the pool name is read
# from a variable group; every stage and job below receives it as a
# parameter so that the value flows down from here.
#
# 'general_purpose_pool_name' is defined in the 'sqlclient-pipeline-config-v1'
# variable group (see /eng/pipelines/libraries/ci-build-variables.yml), for
# both the Public and ADO.Net projects, and names each project's own pool.
# Special-purpose pools, such as the Always Encrypted and ARM64 pools used
# below, are still named directly.
#
- name: defaultPoolName
type: string
default: $(general_purpose_pool_name)
# The timeout, in minutes, for each test job.
- name: testJobTimeout
type: number
# If true, the Always Encrypted (AE) test set will be run, which requires
# Enclave-enabled SQL Server instances.
- name: runAlwaysEncryptedTests
type: boolean
default: true
# Include macOS driver and extension tests in CI; PR pipelines disable them.
- name: runMacOSTests
type: boolean
default: true
# If true, run manual tests against legacy SQL Server versions (2016, 2017).
# Enabled for CI pipelines; disabled for PR pipelines to keep validation fast.
- name: runLegacySqlTests
type: boolean
default: true
# If true, run manual tests against SQL Server 2022.
#
# The primary test configurations run against SQL Server 2025, so SQL Server
# 2022 is CI-only coverage. PR pipelines disable it to keep validation fast.
#
- name: runSql22Tests
type: boolean
default: true
# Build suffix appended to the prerelease tag. PR pipelines pass 'pr',
# CI pipelines pass 'ci'. Official builds leave this empty.
- name: buildSuffix
type: string
- name: dotnetVerbosity
type: string
default: normal
values:
- quiet
- minimal
- normal
- detailed
- diagnostic
variables:
- template: /eng/pipelines/libraries/ci-build-variables.yml@self
- name: abstractionsArtifactsName
value: Abstractions.Artifacts
- name: azureArtifactsName
value: Azure.Artifacts
- name: loggingArtifactsName
value: Logging.Artifacts
- name: mdsArtifactsName
value: MDS.Artifacts
- name: sqlServerArtifactsName
value: SqlServer.Artifacts
stages:
# Compute all package versions up front. Build and test stages consume the
# compute_versions_ci outputs directly, so no version parameters are passed here.
- template: /eng/pipelines/stages/compute-versions-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
poolImage: ADO-UB24
buildSuffix: ${{ parameters.buildSuffix }}
# Generate secrets used throughout the pipeline.
- template: /eng/pipelines/stages/generate-secrets-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
poolImage: ADO-UB24
debug: ${{ parameters.debug }}
# Build the SqlServer package, and publish it to the pipeline artifacts
# under the given artifact name. This runs in parallel with the Secrets
# generation stage since it has no package dependencies.
- template: /eng/pipelines/stages/build-sqlserver-package-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
sqlServerArtifactsName: $(sqlServerArtifactsName)
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
# Build the Logging package, and publish it to the pipeline artifacts
# under the given artifact name. This runs in parallel with the Secrets
# generation stage since it has no package dependencies.
- template: /eng/pipelines/stages/build-logging-package-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
loggingArtifactsName: $(loggingArtifactsName)
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
# Build the Abstractions package, and publish it to the pipeline artifacts
# under the given artifact name.
#
# When building via packages, this depends on the Logging stage since
# Abstractions has a package dependency on Logging.
- template: /eng/pipelines/stages/build-abstractions-package-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
runMacOSTests: ${{ parameters.runMacOSTests }}
abstractionsArtifactsName: $(abstractionsArtifactsName)
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
loggingArtifactsName: $(loggingArtifactsName)
referenceType: ${{ parameters.referenceType }}
# When building Abstractions via packages, we must depend on the Logging
# package.
${{ if eq(parameters.referenceType, 'Package') }}:
additionalDependsOn:
- build_logging_package_stage
# Build the SqlClienet package.
#
# For legacy reasons, this also builds the AKV package.
#
- template: /eng/pipelines/stages/build-sqlclient-package-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
abstractionsArtifactsName: $(abstractionsArtifactsName)
buildConfiguration: ${{ parameters.buildConfiguration }}
loggingArtifactsName: $(loggingArtifactsName)
mdsArtifactsName: $(mdsArtifactsName)
referenceType: ${{ parameters.referenceType }}
sqlServerArtifactsName: $(sqlServerArtifactsName)
SNIVersion: ${{ parameters.SNIVersion }}
SNIValidationFeed: ${{ parameters.SNIValidationFeed }}
# When building SqlClient via packages, we must depend on the Abstractions, Logging,
# and SqlServer packages.
${{ if eq(parameters.referenceType, 'Package') }}:
additionalDependsOn:
- build_abstractions_package_stage
- build_logging_package_stage
- build_sqlserver_package_stage
# Build the Azure package, and publish it to the pipeline artifacts under the
# given artifact name.
- template: /eng/pipelines/stages/build-azure-package-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
runMacOSTests: ${{ parameters.runMacOSTests }}
abstractionsArtifactsName: $(abstractionsArtifactsName)
azureArtifactsName: $(azureArtifactsName)
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
# When building via packages, we must depend on the Abstractions, Logging,
# SqlServer, and MDS packages.
${{ if eq(parameters.referenceType, 'Package') }}:
additionalDependsOn:
- build_abstractions_package_stage
- build_logging_package_stage
- build_sqlserver_package_stage
- build_sqlclient_package_stage
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
loggingArtifactsName: $(loggingArtifactsName)
mdsArtifactsName: $(mdsArtifactsName)
referenceType: ${{ parameters.referenceType }}
sqlServerArtifactsName: $(sqlServerArtifactsName)
# Verify that all NuGet packages comply with Microsoft metadata requirements.
# This runs on a Windows agent after all packages have been built and
# published as pipeline artifacts.
- template: /eng/pipelines/stages/verify-nuget-packages-ci-stage.yml@self
parameters:
poolName: ${{ parameters.defaultPoolName }}
poolImage: ADO-Win25
abstractionsArtifactsName: $(abstractionsArtifactsName)
azureArtifactsName: $(azureArtifactsName)
loggingArtifactsName: $(loggingArtifactsName)
mdsArtifactsName: $(mdsArtifactsName)
sqlServerArtifactsName: $(sqlServerArtifactsName)
# Run the MDS and AKV tests.
- template: /eng/pipelines/common/templates/stages/ci-run-tests-stage.yml@self
parameters:
debug: ${{ parameters.debug }}
buildConfiguration: ${{ parameters.buildConfiguration }}
referenceType: ${{ parameters.referenceType }}
abstractionsArtifactsName: $(abstractionsArtifactsName)
azureArtifactsName: $(azureArtifactsName)
loggingArtifactsName: $(loggingArtifactsName)
mdsArtifactsName: $(mdsArtifactsName)
sqlServerArtifactsName: $(sqlServerArtifactsName)
testJobTimeout: ${{ parameters.testJobTimeout }}
# When testing MDS via packages, we must depend on the Abstractions,
# Logging, SqlServer, MDS, and Azure packages.
${{ if eq(parameters.referenceType, 'Package') }}:
additionalDependsOn:
- build_abstractions_package_stage
- build_logging_package_stage
- build_sqlserver_package_stage
- build_sqlclient_package_stage
- build_azure_package_stage
# Steps to run prior to building and running tests on each job.
prebuildSteps:
- ${{if ne(parameters.SNIVersion, '')}}:
- template: /eng/pipelines/common/templates/steps/override-sni-version.yml@self
parameters:
SNIVersion: ${{parameters.SNIVersion}}
SNIValidationFeed: ${{parameters.SNIValidationFeed}}
- ${{if eq(parameters.debug, true)}}:
- pwsh: "Get-ChildItem env: | Sort-Object Name"
displayName: "[Debug] List Environment Variables"
# Include the code coverage job if the build type is Project.
${{ if eq(parameters.referenceType, 'Project') }}:
# Jobs to run as part of the tests stage, after the tests are done.
postTestJobs:
- template: /eng/pipelines/common/templates/jobs/ci-code-coverage-job.yml@self
parameters:
debug: ${{ parameters.debug }}
poolName: ${{ parameters.defaultPoolName }}
poolImage: ADO-UB24
# We only want to upload coverage results to CodeCov from certain
# pipelines. We use the pipeline name (Build.DefinitionName) to
# choose. This is a predefined variable that is available at
# template expansion time, so we can use it to supply a true boolean
# value to the upload parameter.
#
# https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services
#
# We're choosing to upload from CI-SqlClient only. Other pipelines
# that share this template don't add much, if any, value to the
# coverage reports. They have not been configured with suitable
# CodeCov credentials to perform the upload.
upload: ${{ eq(variables['Build.DefinitionName'], 'CI-SqlClient') }}
# Configuration of test jobs. Each entry in this object will become a test job, and the
# properties of each entry will be supplied as parameters to the test job template.
#
# The OS architecture is assumed to be x64 unless otherwise noted.
#
testConfigurations:
# SQL Server 2016 and 2017 on Windows Server 2022.
${{ if eq(parameters.runLegacySqlTests, true) }}:
# Windows Server 22 with local SQL Server 2016.
win22_sql16:
pool: ${{parameters.defaultPoolName }}
images:
Win22_Sql16: ADO-MMS22-SQL16
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: local
operatingSystem: Windows
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
SQLRootPath: $(SQL16RootPath)
enableLocalDB: true
# Windows Server 22 with local SQL Server 2017.
win22_sql17:
pool: ${{parameters.defaultPoolName }}
images:
Win22_Sql17: ADO-MMS22-SQL17
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: local
operatingSystem: Windows
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
SQLRootPath: $(SQL17RootPath)
enableLocalDB: true
# Windows Server 22 with local SQL Server 2019.
win22_sql19:
pool: ${{parameters.defaultPoolName }}
images:
Win22_Sql19: ADO-MMS22-SQL19
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: local
operatingSystem: Windows
# config.jsonc properties
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
SQLRootPath: $(SQL19RootPath)
enableLocalDB: true
# Windows Server 22 with local SQL Server 2019, x86.
win22_sql19_x86:
pool: ${{parameters.defaultPoolName }}
images:
Win22_Sql19_x86: ADO-MMS22-SQL19
TargetFrameworks: [net462, net10.0]
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: [false]
configSqlFor: local
operatingSystem: Windows
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
x86TestTargetFrameworks: [net462, net10.0]
SQLRootPath: $(SQL19RootPath)
enableLocalDB: true
# Windows Server 25 with local SQL Server 2025.
win25_sql25:
pool: ${{parameters.defaultPoolName }}
images:
Win25_Sql25: ADO-MMS25-SQL25
TargetFrameworks: ${{parameters.primaryTargetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: local
operatingSystem: Windows
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
SQLRootPath: $(SQL25RootPath)
enableLocalDB: true
# Windows Server 25 with local SQL Server 2025, x86.
win25_sql25_x86:
pool: ${{parameters.defaultPoolName }}
images:
Win25_Sql25_x86: ADO-MMS25-SQL25
TargetFrameworks: [net462, net10.0]
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: [false]
configSqlFor: local
operatingSystem: Windows
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
x86TestTargetFrameworks: [net462, net10.0]
SQLRootPath: $(SQL25RootPath)
enableLocalDB: true
# Windows Server 25 with local SQL Server 2025 Named Instance.
win25_sql25_named_instance:
pool: ${{parameters.defaultPoolName }}
images:
Win25_Sql25_Named_Instance: ADO-MMS25-SQL25-WITH-NAMED-INSTANCE
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: local
operatingSystem: Windows
configProperties:
TCPConnectionString: $(SQL_TCP_INSTANCE_CONN_STRING)
NPConnectionString: $(SQL_NP_INSTANCE_CONN_STRING)
SupportsIntegratedSecurity: true
SQLRootPath: $(SQL25RootPath)
instanceName: $(NamedInstance)
# Windows Server 2025, x64 build platform, with Azure SQL Server.
win25_azure_sql:
pool: ${{parameters.defaultPoolName }}
images:
Win25_Azure_Sql: ADO-Win25
TargetFrameworks: ${{parameters.primaryTargetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: azure
operatingSystem: Windows
configProperties:
TCPConnectionString: $(AZURE_SQL_CONN_STRING_WestUS2)
NPConnectionString: $(AZURE_SQL_CONN_STRING_WestUS2)
# Pipeline runs against forks of the repo don't have access to Library secrets, so we
# omit them entirely from the configProperties, which causes the dependent tests to be
# skipped.
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
AADServicePrincipalSecret: $(AADServicePrincipalSecret)
AADServicePrincipalId: $(AADServicePrincipalId)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
# Windows 11, x64 build platform, with Azure SQL Server.
win11_azure_sql:
pool: ${{parameters.defaultPoolName }}
images:
Win11_Azure_Sql: ADO-CI-Win11
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: azure
operatingSystem: Windows
configProperties:
TCPConnectionString: $(AZURE_SQL_CONN_STRING_WestUS2)
NPConnectionString: $(AZURE_SQL_CONN_STRING_WestUS2)
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
AADServicePrincipalSecret: $(AADServicePrincipalSecret)
AADServicePrincipalId: $(AADServicePrincipalId)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
# Windows 11 on ARM64 with Azure SQL Server.
win11_azure_sql_arm64:
pool: ADO-CI-PUBLIC-ARM64-1ES-EUS-POOL
images:
Win11_Azure_Sql_ARM64: ADO-WIN11-ARM64
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: azure
operatingSystem: Windows
configProperties:
TCPConnectionString: $(AZURE_SQL_CONN_STRING_EastUS)
NPConnectionString: $(AZURE_SQL_CONN_STRING_EastUS)
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
AADServicePrincipalSecret: $(AADServicePrincipalSecret)
AADServicePrincipalId: $(AADServicePrincipalId)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId_eastus)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
# Linux Ubuntu 24 with local SQL Server 2025.
linux_ub24_sql25:
pool: ${{parameters.defaultPoolName }}
images:
Ubuntu24_Sql25: ADO-UB24-SQL25
TargetFrameworks: ${{parameters.primaryTargetFrameworksUnix }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: [AnyCPU]
testSets: ${{parameters.testSets }}
useManagedSNI: [true]
configSqlFor: local
operatingSystem: Linux
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
# SQL Server 2022 coverage, on Windows and Linux.
#
# The primary configurations run against SQL Server 2025, so these keep
# SQL Server 2022 in the matrix. They are grouped under a single
# conditional so that PR pipelines can opt out of them as a unit.
${{ if eq(parameters.runSql22Tests, true) }}:
# Windows Server 22 with local SQL Server 2022.
win22_sql22:
pool: ${{parameters.defaultPoolName }}
images:
Win22_Sql22: ADO-MMS22-SQL22
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: ${{parameters.testSets }}
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: local
operatingSystem: Windows
# config.jsonc properties
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
FileStreamDirectory: $(FileStreamDirectory)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
SQLRootPath: $(SQL22RootPath)
enableLocalDB: true
# Linux Ubuntu 22 with local SQL Server 2022.
linux_ub22_sql22:
pool: ${{parameters.defaultPoolName }}
images:
Ubuntu22_Sql22: ADO-UB22-SQL22
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: [AnyCPU]
testSets: ${{parameters.testSets }}
useManagedSNI: [true]
configSqlFor: local
operatingSystem: Linux
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
AliasName: $(SQLAliasName)
# Linux Ubuntu 24 with Azure SQL Server.
linux_ub24_azure_sql:
pool: ${{parameters.defaultPoolName }}
images:
Ubuntu24_Azure_Sql: ADO-UB24
TargetFrameworks: ${{parameters.primaryTargetFrameworksUnix }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: [AnyCPU]
testSets: ${{parameters.testSets }}
useManagedSNI: [true]
configSqlFor: azure
operatingSystem: Linux
configProperties:
TCPConnectionString: $(AZURE_SQL_CONN_STRING_WestUS2)
NPConnectionString: $(AZURE_SQL_CONN_STRING_WestUS2)
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
AADServicePrincipalSecret: $(AADServicePrincipalSecret)
AADServicePrincipalId: $(AADServicePrincipalId)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
# macOS with local SQL Server 2025 (docker), x64 build platform.
${{ if eq(parameters.runMacOSTests, true) }}:
mac_sql25:
pool: Azure Pipelines
images:
MacOSLatest_Sql25: macos-latest
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: [AnyCPU]
testSets: ${{parameters.testSets }}
useManagedSNI: [true]
configSqlFor: local
operatingSystem: Mac
configProperties:
TCPConnectionString: $(SQL_TCP_CONN_STRING)
NPConnectionString: $(SQL_NP_CONN_STRING)
SupportsIntegratedSecurity: false
ManagedIdentitySupported: false
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
# Enclave tests
#
# Only run these tests if explicitly enabled, and if we're not a forked repo (which won't
# have access to the necessary Library secrets).
${{ if and(eq(parameters.runAlwaysEncryptedTests, true), eq(variables['System.PullRequest.IsFork'], 'False')) }}:
# Windows Server 22 with remote Enclave-enabled SQL Server 2019.
win22_enclave_sql19:
pool: ADO-CI-AE-1ES-Pool
images:
Win22_Enclave_Sql19: ADO-Win25
TargetFrameworks: ${{parameters.targetFrameworks }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: ${{parameters.buildPlatforms }}
testSets: [AE]
useManagedSNI: ${{parameters.useManagedSNI }}
configSqlFor: enclave
operatingSystem: Windows
configProperties:
TCPConnectionStringHGSVBS: $(SQL_TCP_CONN_STRING_HGSVBS)
TCPConnectionStringNoneVBS: $(SQL_TCP_CONN_STRING_NoneVBS)
TCPConnectionStringAASSGX: $(SQL_TCP_CONN_STRING_AASSGX)
EnclaveEnabled: true
AADServicePrincipalId: $(AADServicePrincipalId)
AADServicePrincipalSecret: $(AADServicePrincipalSecret)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: true
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
AliasName: $(SQLAliasName)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)
# Linux Ubuntu 24 with remote Enclave-enabled SQL Server 2019.
linux_ub24_enclave_sql19:
pool: ADO-CI-AE-1ES-Pool
images:
Ubuntu24_Enclave_Sql19: ADO-UB24
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
buildPlatforms: [AnyCPU]
testSets: [AE]
useManagedSNI: [true]
configSqlFor: enclave
operatingSystem: Linux
configProperties:
TCPConnectionStringHGSVBS: $(SQL_TCP_CONN_STRING_HGSVBS)
TCPConnectionStringNoneVBS: $(SQL_TCP_CONN_STRING_NoneVBS)
TCPConnectionStringAASSGX: $(SQL_TCP_CONN_STRING_AASSGX)
EnclaveEnabled: true
AADServicePrincipalId: $(AADServicePrincipalId)
AADServicePrincipalSecret: $(AADServicePrincipalSecret)
AzureKeyVaultUrl: $(AzureKeyVaultUrl)
AzureKeyVaultTenantId: $(AzureKeyVaultTenantId)
SupportsIntegratedSecurity: false
UserManagedIdentityClientId: $(UserManagedIdentityClientId)
LocalDbAppName: $(LocalDbAppName)
LocalDbSharedInstanceName: $(LocalDbSharedInstanceName)