Skip to content

[ci] Use repo NuGet config for template smoke build - #12335

Open
jonathanpeppers wants to merge 3 commits into
mainfrom
jonathanpeppers-fix-smoke-restore-access
Open

[ci] Use repo NuGet config for template smoke build#12335
jonathanpeppers wants to merge 3 commits into
mainfrom
jonathanpeppers-fix-smoke-restore-access

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Aug 10, 2026

Copy link
Copy Markdown
Member

Why

Depends on #12336.

The Windows template smoke project is generated under $(Build.StagingDirectory), outside the repository NuGet.config hierarchy. 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

  • Pass RestoreConfigFile=$(System.DefaultWorkingDirectory)\NuGet.config to the template build.
  • Quote the template creation and build staging paths using Windows path syntax.

Validation

  • Parsed build-windows-steps.yaml successfully.

  • Ran git diff --check.

  • Verified the Windows create and build commands with generated project paths containing spaces.

  • Verified restore used only the repository NuGet.config feeds and binlogtool reported the expected RestoreConfigFile.

  • 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).

Copilot AI lite review requested due to automatic review settings August 10, 2026 16:56
@jonathanpeppers jonathanpeppers changed the title jonathanpeppers fix smoke restore access [ci] Use repo NuGet config for template smoke build Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.config to the template dotnet build to 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.

Comment thread build-tools/automation/yaml-templates/build-windows-steps.yaml
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Aug 10, 2026
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the current changes. NuGet config propagation, quoting, working directories, approved-feed isolation, and public/internal pipeline parity look correct. No blocking issues found.

Base automatically changed from jonathanpeppers-fix-pipeline-nuget-access to main August 11, 2026 19:09
@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-fix-smoke-restore-access branch from 9c5d68a to 7ba9e2a Compare August 11, 2026 19:10

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

Test failure is unrelated.

jonathanpeppers and others added 3 commits August 11, 2026 16:49
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
@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-fix-smoke-restore-access branch from 7ba9e2a to 744005d Compare August 11, 2026 21:49
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants