| applyTo |
|---|
eng/pipelines/**/*.yml |
This repository uses Azure DevOps Pipelines for CI/CD. The pipeline configurations are located in eng/pipelines/.
ADO Organization: sqlclientdrivers ADO Project: ADO.NET
eng/pipelines/
├── abstractions/ # Abstractions package pipelines
├── azure/ # Azure package pipelines
├── common/ # Shared templates
│ └── templates/
│ ├── jobs/ # Reusable job templates
│ ├── stages/ # Reusable stage templates
│ └── steps/ # Reusable step templates
├── jobs/ # Top-level job definitions
├── libraries/ # Shared variable definitions
├── stages/ # Stage definitions
├── steps/ # Step definitions
├── variables/ # Variable templates
├── akv-official-pipeline.yml # AKV provider official/signing build
├── dotnet-sqlclient-ci-core.yml # Core CI pipeline (reusable)
├── dotnet-sqlclient-ci-package-reference-pipeline.yml # CI with package references
├── dotnet-sqlclient-ci-project-reference-pipeline.yml # CI with project references
├── dotnet-sqlclient-signing-pipeline.yml # Package signing pipeline
├── sqlclient-pr-package-ref-pipeline.yml # PR validation (package ref)
├── sqlclient-pr-project-ref-pipeline.yml # PR validation (project ref)
└── stress-tests-pipeline.yml # Stress testing
Reusable core CI pipeline consumed by both project-reference and package-reference CI pipelines. Configurable parameters:
| Parameter | Description | Default |
|---|---|---|
targetFrameworks |
Windows test frameworks | [net462, net8.0, net9.0, net10.0] |
targetFrameworksUnix |
Unix test frameworks | [net8.0, net9.0, net10.0] |
referenceType |
Project or Package reference | Required |
buildConfiguration |
Debug or Release | Required |
useManagedSNI |
Test with managed SNI | [false, true] |
testJobTimeout |
Test job timeout (minutes) | Required |
runAlwaysEncryptedTests |
Include AE tests | true |
enableStressTests |
Include stress test stage | false |
dotnet-sqlclient-ci-project-reference-pipeline.yml— Full CI using project references (builds from source)dotnet-sqlclient-ci-package-reference-pipeline.yml— Full CI using package references (tests against published NuGet packages)
sqlclient-pr-project-ref-pipeline.yml— PR validation with project referencessqlclient-pr-package-ref-pipeline.yml— PR validation with package references
These pipelines trigger on pull requests and run a subset of the full CI matrix to provide fast feedback.
Signs and publishes NuGet packages. Used for official releases. Requires secure service connections and key vault access for code signing.
Builds and signs the Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider add-on package separately from the main driver. Uses 1ES pipeline templates for compliance.
Optional pipeline for long-running stress and endurance testing. Enabled via enableStressTests parameter in CI core.
- build_abstractions_package_stage: Build and pack abstractions
- build_sqlclient_package_stage: Build main driver and AKV packages
- build_azure_package_stage: Build Azure extensions package
- stress_tests_stage: Optional stress testing
- run_tests_stage: Execute all test suites
Tests are divided into sets for parallelization:
TestSet=1— First partition of testsTestSet=2— Second partitionTestSet=3— Third partitionTestSet=AE— Always Encrypted tests
Tests use category-based filtering. The default filter excludes both failing and flaky tests:
category!=failing&category!=flaky
Category values:
nonnetfxtests— Excluded on .NET Frameworknonnetcoreapptests— Excluded on .NET Corenonwindowstests— Excluded on Windowsnonlinuxtests— Excluded on Linuxfailing— Known permanent failures (excluded from all runs)flaky— Intermittently failing tests (quarantined, run separately)
Quarantined tests ([Trait("Category", "flaky")]) run in separate pipeline steps after the main test steps. This ensures:
- Main test runs are not blocked by intermittent failures
- Flaky tests are still monitored for regression or resolution
- Code coverage is not collected for flaky test runs
- Results appear in pipeline output for visibility
The quarantine steps are configured in:
eng/pipelines/common/templates/steps/build-and-run-tests-netcore-step.ymleng/pipelines/common/templates/steps/build-and-run-tests-netfx-step.ymleng/pipelines/common/templates/steps/run-all-tests-step.yml
All test runs use --blame-hang-timeout 10m (configured in build.proj). Tests exceeding 10 minutes are killed and reported as failures.
The useManagedSNI parameter controls testing with:
- Native SNI (
false) - Windows native library - Managed SNI (
true) - Cross-platform managed implementation
Common build configuration:
- Package versions
- Build paths
- Signing configuration
Set via pipeline parameters or UI:
Configuration- Debug/ReleasePlatform- AnyCPU/x86/x64TF- Target framework
- Add category attribute to tests:
[Category("newcategory")] - Update filter expressions in test job templates
- Document category purpose in test documentation
- Define parameter in appropriate
.ymlfile - Add to parameter passing in calling templates
- Document in this file
- Changes should be made in template files for reusability
- Test changes locally when possible
- Submit as PR - validation will run
- Use templates for reusable definitions
- Pass parameters explicitly (avoid global variables)
- Use descriptive stage/job/step names
- Use template variables for shared values
- Use pipeline parameters for per-run configuration
- Avoid hardcoding versions (use Directory.Packages.props)
- Ensure tests are properly categorized
- Handle test configuration files properly
- Use test matrix for cross-platform coverage
- Test failures due to missing config: Ensure
config.jsonexists - Platform-specific failures: Check platform exclusion categories
- Timeout issues: Increase
testJobTimeoutparameter
- Enable debug mode via
debug: trueparameter - Use
dotnetVerbosity: diagnosticfor detailed output - Check build logs in Azure DevOps
- Pipelines use service connections for artifact publishing
- Signing uses secure key vault integration
- Sensitive configuration should use pipeline secrets
- Never commit credentials in pipeline files
- BUILDGUIDE.md - Local build instructions
- Azure DevOps Documentation