Add CI package pipeline for building and publishing NuGet packages#4292
Add CI package pipeline for building and publishing NuGet packages#4292paulmedynski wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new CI pipeline that builds and publishes NuGet packages via build.proj in ReferenceType=Package mode, alongside a broader refactor to make package-mode builds self-sustaining: version flow is unified through import-guarded Versions.props files imported early by Directory.Packages.props, all Pack* targets now mirror their output into the local packages/ feed and gain DependsOn chains so dependent packages restore against freshly built nupkgs, and many test/csproj files now switch between ProjectReference and PackageReference for Microsoft.SqlServer.Server based on ReferenceType. A new signed test category gates UDT tests that require a strong-name-signed Microsoft.SqlServer.Server.
Changes:
- New pipeline
eng/pipelines/ci/package/sqlclient-package.yml(push tomain/internal/main, nightly, optional strong-name signing on internal builds). build.projandDirectory.Packages.propsoverhaul: package-modeDependsOn/Pack mirroring, centralSqlServerPackageVersiontoken wiring,category!=signedfilter for unsigned builds.- Threading of
sqlServerArtifactsName/sqlServerPackageVersionthrough existing CI templates, and reference-mode switching forMicrosoft.SqlServer.Serveracross csprojs (including nuspec token$SqlServerPackageVersion$).
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/ci/package/sqlclient-package.yml | New CI pipeline that packs all packages and publishes Packages artifact. |
| build.proj | Adds package-mode DependsOn chains, output mirroring to packages/, category!=signed filter, and PackageVersionSqlServer threading. |
| Directory.Packages.props | Imports all Versions.props in Package mode to centrally manage sibling package versions. |
| doc/Directory.Packages.props, doc/samples/Microsoft.Data.SqlClient.Samples.csproj | Pin and reorganize Microsoft.SqlServer.Server package usage. |
| src/Directory.Build.props | Comment clarifying FileVersionBuildNumber ordering relative to Directory.Packages.props. |
| src/**/Versions.props (×6) | Add per-product import-guard property to prevent double evaluation. |
| src/**/*.csproj (Logging, Abstractions, Azure, AKV, SqlServer, SqlClient src/ref/notsupported) | Conditional Versions.props import using the new guard; SqlClient ref/notsupported gain SqlServer reference; nuspec token updated. |
| src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj | Adds SqlServer version import, trim, validation error, and nuspec token replacement. |
| src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.nuspec | Replaces hard-coded 1.0.0 with $SqlServerPackageVersion$ token. |
| src/Microsoft.Data.SqlClient/tests/UnitTests/...csproj | Adds ValidateReferenceType target and project reference to Microsoft.SqlServer.Server. |
| src/Microsoft.Data.SqlClient/tests/ManualTests/...csproj | Reference-mode switching for Microsoft.SqlServer.Server (top-level and UDT projects). |
| src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj | Enables ImplicitUsings. |
| src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs, FunctionalTests/SqlDataRecordTest.cs | Adds [Trait("Category", "signed")] on NETFRAMEWORK for UDT tests requiring signed SqlServer assembly. |
| eng/pipelines/**/*.yml (ci-core, build-sqlclient/azure stages, ci-run-tests stage/job, ci-build-nugets, ci-project-build, run-all-tests, test-azure-package job) | Thread new sqlServerArtifactsName/sqlServerPackageVersion parameter and download the SqlServer artifact for package-mode test/build flows. |
2b54e4e to
da6d01c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev/paul/sql-server-project-refs #4292 +/- ##
===================================================================
Coverage ? 65.83%
===================================================================
Files ? 277
Lines ? 66014
Branches ? 0
===================================================================
Hits ? 43458
Misses ? 22556
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds a new top-level pipeline at
eng/pipelines/ci/package/sqlclient-package.ymlthat:mainand ADOinternal/mainbranches (batched)packages/directory before buildingbuild.projPack target withReferenceType=PackageTested ADO.Net project runs here:
We can't test Public project runs until this merges, because we can only create new pipelines based on GitHub for YAML files on main.