[ci] Use repo NuGet config for template smoke build - #12335
[ci] Use repo NuGet config for template smoke build#12335jonathanpeppers wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Windows CI template smoke-build step to ensure restores use the repository-approved NuGet sources even when the generated project lives outside the repo’s NuGet.config hierarchy, avoiding reliance on the agent’s machine-level NuGet configuration.
Changes:
- Passes
-p:RestoreConfigFile=...NuGet.configto the templatedotnet buildto force repository NuGet source usage. - Quotes the staging-directory project path for the build invocation and switches to Windows-style path separators.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed the current changes. NuGet config propagation, quoting, working directories, approved-feed isolation, and public/internal pipeline parity look correct. No blocking issues found.
9c5d68a to
7ba9e2a
Compare
dalexsoto
left a comment
There was a problem hiding this comment.
The current head only updates the base; the workflow change remains identical to the previously approved revision, and the NuGet config propagation and Windows path quoting are still correct. No blocking issues found.
|
Test failure is unrelated. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PR #12334 disables NuGet auditing for the pipeline, so keep this layer focused on selecting the approved restore configuration for the out-of-repo smoke project. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 65dd1c1b-3b71-437c-87d8-1a0efdb512e7
Keep the create and build steps consistent so the smoke test remains valid when the staging directory contains spaces. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 65dd1c1b-3b71-437c-87d8-1a0efdb512e7
7ba9e2a to
744005d
Compare
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Re-reviewed the current context. The workflow diff remains byte-identical to the approved revision, and the repository NuGet configuration and Windows path quoting remain correct. No blocking issues found.
Why
Depends on #12336.
The Windows template smoke project is generated under
$(Build.StagingDirectory), outside the repositoryNuGet.confighierarchy. Its implicit build restore therefore falls back to the agent's machine NuGet configuration and may access unapproved package feeds.#12336 disables NuGet auditing pipeline-wide. This dependent change keeps the smoke build's restore on the repository's approved sources.
Changes
RestoreConfigFile=$(System.DefaultWorkingDirectory)\NuGet.configto the template build.Validation
Parsed
build-windows-steps.yamlsuccessfully.Ran
git diff --check.Verified the Windows create and build commands with generated project paths containing spaces.
Verified restore used only the repository
NuGet.configfeeds andbinlogtoolreported the expectedRestoreConfigFile.Useful description of why the change is necessary.
Links to issues fixed (depends on [ci] Prevent isolated NuGet access #12336; no GitHub issue).
Unit tests (not applicable to pipeline-only YAML; targeted validation listed above).