Move symbol publishing into a dedicated stage and refactor build artifacts#4175
Move symbol publishing into a dedicated stage and refactor build artifacts#4175paulmedynski wants to merge 11 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the OneBranch pipeline artifact layout and moves symbol publishing out of individual build jobs into a dedicated publish_symbols stage, aligning APIScan and symbol publishing to consume standardized JOB_OUTPUT subfolders.
Changes:
- Introduces a dedicated
publish_symbolsstage with per-package symbol publishing jobs, driven by a shared step/script. - Renames
PACK_INPUT/PACK_OUTPUTtoJOB_INPUT/JOB_OUTPUTand reorganizes outputs intoassemblies/,packages/, andsymbols/. - Updates build/release/validation templates to consume packages from
packages/and symbols fromsymbols/, removing the old SqlClient APIScan copy step.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/onebranch/variables/onebranch-variables.yml | Switches symbol credentials variable group reference to Symbols Publishing. |
| eng/pipelines/onebranch/variables/common-variables.yml | Renames PACK_* vars to JOB_* and documents new JOB_OUTPUT subfolder conventions. |
| eng/pipelines/onebranch/steps/tests/README.md | Adds documentation for running Pester tests for symbol publishing script. |
| eng/pipelines/onebranch/steps/tests/Publish-Symbols.Tests.ps1 | Adds Pester tests validating Publish-Symbols behavior via mocks. |
| eng/pipelines/onebranch/steps/Publish-Symbols.ps1 | Extracts symbol publishing logic into a standalone script with structured error handling. |
| eng/pipelines/onebranch/steps/publish-symbols-step.yml | Refactors publish step to call the extracted script and adds symbolsFolder parameter. |
| eng/pipelines/onebranch/steps/pack-sqlclient-step.yml | Copies SqlClient NuGet outputs into $(JOB_OUTPUT)/packages. |
| eng/pipelines/onebranch/steps/pack-csproj-step.yml | Packs csproj-based packages into $(JOB_OUTPUT)/packages. |
| eng/pipelines/onebranch/steps/copy-apiscan-files-sqlclient-step.yml | Removes legacy APIScan file copy step (deleted). |
| eng/pipelines/onebranch/stages/release-stages.yml | Updates release stage to push packages from the packages/ subdirectory. |
| eng/pipelines/onebranch/stages/publish-symbols-stage.yml | Adds new stage template to publish symbols per package from downloaded build artifacts. |
| eng/pipelines/onebranch/stages/build-stages.yml | Removes in-job symbol publishing parameters and job wiring (moved to stage). |
| eng/pipelines/onebranch/sqlclient-official.yml | Wires in the new publish-symbols-stage.yml between build and release stages. |
| eng/pipelines/onebranch/sqlclient-non-official.yml | Wires in the new publish-symbols-stage.yml between build and release stages. |
| eng/pipelines/onebranch/jobs/validate-signed-package-job.yml | Updates validation job to locate packages under <artifact>/packages. |
| eng/pipelines/onebranch/jobs/publish-symbols-job.yml | Adds per-package symbols publishing job template (download artifact + publish step). |
| eng/pipelines/onebranch/jobs/publish-nuget-package-job.yml | Updates release job to treat packages as living under packages/ within artifacts. |
| eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml | Updates APIScan folder vars and copies DLLs/PDBs into JOB_OUTPUT subfolders; removes symbol publishing. |
| eng/pipelines/onebranch/jobs/build-signed-csproj-package-job.yml | Updates APIScan folder vars and copies DLLs/PDBs into JOB_OUTPUT subfolders; removes symbol publishing. |
| .github/instructions/onebranch-pipeline-design.instructions.md | Updates OneBranch pipeline design docs for new symbols stage and artifact layout. |
…facts - Extract symbol publishing from build jobs into a new publish_symbols stage (publish-symbols-stage.yml) with per-package jobs (publish-symbols-job.yml) - Reorganize JOB_OUTPUT subdirectories: assemblies/ (APIScan), packages/ (NuGet), symbols/ (PDBs shared by APIScan and symbol publishing) - Point APIScan at JOB_OUTPUT/assemblies and JOB_OUTPUT/symbols instead of separate apiScan/ tree; remove copy-apiscan-files-sqlclient-step.yml - Rename PACK_OUTPUT -> JOB_OUTPUT, PACK_INPUT -> JOB_INPUT for clarity - Extract inline PowerShell into Publish-Symbols.ps1 with structured error handling; add Pester tests - Rename variable group symbols-variables-v2 -> Symbols Publishing - Remove artifactPath variable from validate job in favor of packagesPath - Append $(System.JobAttempt) to symbol artifact names for retry safety - Guard publish_symbols stage against empty runs when no packages were built
0dccecb to
bbf6303
Compare
…ols jobs - Add canonical docs link and two-step process documentation to publish-symbols-step.yml and publish-symbols.ps1 - Rename task display names to Step 1/Step 2 for clarity - Disable APIScan and BinSkim in publish-symbols-job.yml since symbols jobs only upload/publish PDBs with no assemblies to scan
- Update packagePath docs in publish-nuget-package-job.yml to reflect packages/ subdirectory layout and clarify .snupkg handling - Fix README.md test file name casing (Publish-Symbols -> publish-symbols) - Fix README.md repo-root path (steps/tests -> scripts/tests)
apoorvdeshmukh
left a comment
There was a problem hiding this comment.
Changes look good based on this run.
As agreed earlier, we can merge this once the symbols account setup is complete.
|
The backend work has been completed, and symbol publishing is working> https://sqlclientdrivers.visualstudio.com/ADO.Net/_build/results?buildId=147410&view=results |
Non-official pipeline now uses SymbolsPublishServerPPE and SymbolsPublishTokenUriPPE. Official pipeline uses the Prod variants.
|
Successful run using PPE for symbols publishing is here: https://sqlclientdrivers.visualstudio.com/ADO.Net/_build/results?buildId=148117&view=results |
- Update SymbolsPublishServer/SymbolsPublishTokenUri to their actual suffixed names (Prod/PPE) in onebranch-variables.yml header comment - Fix Publish-Symbols.ps1 -> publish-symbols.ps1 casing in onebranch-pipeline-design.instructions.md
| symbolsUploadAccount: '${{ parameters.symbolsUploadAccount }}' | ||
|
|
||
| # ── AKV Provider ─────────────────────────────────────────────── | ||
| - ${{ if and(eq(parameters.buildAkvProvider, true), eq(parameters.buildSqlClient, true)) }}: |
There was a problem hiding this comment.
Why is this condition an and?
Summary
publish_symbolsstage (publish-symbols-stage.yml) with per-package jobs (publish-symbols-job.yml)JOB_OUTPUTsubdirectories:assemblies/(APIScan),packages/(NuGet),symbols/(PDBs shared by APIScan and symbol publishing)JOB_OUTPUT/assembliesandJOB_OUTPUT/symbolsinstead of separateapiScan/tree; removecopy-apiscan-files-sqlclient-step.ymlPACK_OUTPUT→JOB_OUTPUT,PACK_INPUT→JOB_INPUTfor clarityPublish-Symbols.ps1with structured error handling; add Pester testssymbols-variables-v2→Symbols PublishingartifactPathvariable from validate job in favor ofpackagesPath$(System.JobAttempt)to symbol artifact names for retry safetypublish_symbolsstage against empty runs when no packages were builtSymbolsPublishServerPPE,SymbolsPublishTokenUriPPE), official pipeline targets Prod (SymbolsPublishServerProd,SymbolsPublishTokenUriProd)Checklist