azure-pipelines: Restore signing project from internal NuGet feed to avoid nuget.org requests#2292
Closed
Copilot wants to merge 4 commits into
Closed
azure-pipelines: Restore signing project from internal NuGet feed to avoid nuget.org requests#2292Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
…quisite Agent-Logs-Url: https://github.com/microsoft/vscode-azuretools/sessions/8d4f153f-de57-474b-b9af-f03039c92049 Co-authored-by: bwateratmsft <36966225+bwateratmsft@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
bwateratmsft
May 18, 2026 14:03
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the legacy Azure Pipelines signing flow to restore signing-project NuGet dependencies from an internal Azure Artifacts feed before building, reducing unintended public nuget.org traffic.
Changes:
- Adds a
nugetFeedparameter withDevDiv/azcodedefaults and passes it through the 1ES templates. - Adds an explicit
DotNetCoreCLI@2 restorestep forSignExtension.signproj. - Uses
--no-restorefor signing builds and documents the NuGet feed prerequisite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
azure-pipelines/templates/sign.yml |
Adds explicit NuGet restore and prevents implicit restore during signing builds. |
azure-pipelines/1esmain.yml |
Exposes and forwards the new nugetFeed parameter. |
azure-pipelines/1esstages.yml |
Forwards nugetFeed into the signing template. |
azure-pipelines/README.md |
Documents the signing NuGet feed requirement and override behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Nothing is working for this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why builds were hitting nuget.org
The signing template
azure-pipelines/templates/sign.ymlrunsDotNetCoreCLI@2withcommand: "build"on the consumer repo'sSignExtension.signproj. That signproj has a<PackageReference>onMicrosoft.VisualStudioEng.MicroBuild.Core, sodotnet buildperforms an implicitdotnet restoreagainst whatever NuGet sources the agent has configured — by default the publicapi.nuget.org/v3/index.jsonfeed. That's the source of the outbound NuGet traffic. The npm side already routes through${{ parameters.npmFeed }}(DevDiv/azcode), which is why npm was already internal but NuGet wasn't.The v2 templates under
azdo-pipelines/use a different signing flow (DDSignFiles.dllfrom$MBSIGN_APPFOLDER) and don't rundotnet buildon a NuGet-referencing project, so they're unaffected.Fix
nugetFeedparameter (defaultDevDiv/azcode) toazure-pipelines/templates/sign.yml.DotNetCoreCLI@2restorestep usingfeedsToUse: select+vstsFeed: ${{ parameters.nugetFeed }}before the build step(s).--no-restoreto bothDotNetCoreCLI@2 buildinvocations (single-vsix and multi-vsix branches) so the build step doesn't trigger an implicit restore that would bypass the explicit one.nugetFeedthroughazure-pipelines/1esmain.ymlandazure-pipelines/1esstages.yml, with the sameDevDiv/azcodedefault asnpmFeed.azure-pipelines/README.md.nugetFeed: ''opts out cleanly (falls back to default NuGet sources = previous behavior), so the parameter is fully optional.Manual steps required (cannot be automated)
The
DevDiv/azcodeAzure Artifacts feed currently only mirrors npm. To finish the fix, do one of the following in Azure DevOps:api.nuget.org/v3/index.jsonas a NuGet upstream source on theDevDiv/azcodefeed (Feed Settings → Upstream sources → Add upstream → Public source →nuget.org). The first signing build after this change will populate the feed withMicrosoft.VisualStudioEng.MicroBuild.Coreand its transitive dependencies on demand; nothing else needs to change downstream.nugetFeed: '<Project>/<Feed>'when extendingazure-pipelines/1esmain.yml@azExtTemplates.nugetFeed: ''to fall back to the default NuGet sources (i.e., keep the previous behavior).Notes
azure-pipelines/release-extension.yml) does not rundotnet, so it does not need this change.