Prevent scanning/signing of unrelated packages#4007
Prevent scanning/signing of unrelated packages#4007samsharma2700 wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Separates downloaded dependency packages from newly-built NuGet outputs in CI/PR pipelines to avoid re-uploading unrelated packages as artifacts.
Changes:
- Updates
packagePathto useoutput/as the build/artifact output directory. - Redirects pipeline artifact downloads to
packages/(local feed) instead of$(packagePath).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| eng/pipelines/libraries/ci-build-variables.yml | Moves packagePath from packages/ to output/ and documents why. |
| eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml | Downloads dependent package artifacts into packages/ to avoid contaminating build outputs/artifacts. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #4007 +/- ##
==========================================
- Coverage 74.38% 67.09% -7.30%
==========================================
Files 287 282 -5
Lines 43982 67171 +23189
==========================================
+ Hits 32717 45068 +12351
- Misses 11265 22103 +10838
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:
|
mdaigle
left a comment
There was a problem hiding this comment.
Looks good. You should be able to temporarily open a PR against the ADO repo to do a test run of the ci pipeline against these changes.
Description
(Part 2 of 2) Continuation of the package isolation work from Part 1. The CI/PR validation pipelines (ci-build-nugets-job.yml) have the same issue: they download dependency packages from previous stages into a directory, then build new NuGet packages into the same directory. The
packagePathvariable controls where built packages are published as pipeline artifacts, so any downloaded packages in the same location get re-uploaded as artifacts unnecessarily.Solution
Apply the same
packages/vsoutput/separation to the CI/PR pipelines:packagePath(inci-build-variables.yml) now points tooutput/: this is where dotnet pack / nuget pack outputs go and what gets published as pipeline artifactsci-build-nugets-job.ymlare hardcoded to$(Build.SourcesDirectory)/packagesinstead of using$(packagePath), so downloaded dependencies stay in the NuGet local feed directory and don't contaminate the artifact uploadNotes
This PR (Part 2) covers the CI/PR validation pipelines that build packages for testing during pull requests and continuous integration. No MSBuild or .gitignore changes needed, those were handled in Part 1.