Route CI package restores through the CFS feed - #16348
Closed
Vineeth (vineethkuttan) wants to merge 1 commit into
Closed
Route CI package restores through the CFS feed#16348Vineeth (vineethkuttan) wants to merge 1 commit into
Vineeth (vineethkuttan) wants to merge 1 commit into
Conversation
Contributor
Author
|
/azp run PR |
Contributor
|
Azure Pipelines: No pipelines were found matching this branch/path. |
Contributor
Author
|
/azp run |
Contributor
|
Azure Pipelines: No pipelines were found matching this branch/path. |
Contributor
Author
|
/azp run |
Contributor
|
Azure Pipelines: No pipelines were found matching this branch/path. |
Contributor
There was a problem hiding this comment.
Pull request overview
Routes Azure Pipelines npm restores through the authenticated CFS-backed Azure Artifacts feed.
Changes:
- Adds reusable feed configuration and authentication.
- Routes Yarn and Verdaccio restores through CFS.
- Restores feed configuration after Verdaccio tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.ado/verdaccio/config.yaml |
Redirects Verdaccio’s uplink to CFS. |
.ado/templates/yarn-install.yml |
Authenticates Yarn installs. |
.ado/templates/verdaccio-stop.yml |
Restores the CFS registry. |
.ado/templates/verdaccio-start.yml |
Supplies Verdaccio credentials. |
.ado/templates/strict-yarn-install.yml |
Authenticates strict installs. |
.ado/templates/configure-npm-feed.yml |
Configures and authenticates npm. |
.ado/prepare-release-bot.yml |
Routes release-bot restores through CFS. |
.ado/build-template.yml |
Configures CFS during pipeline setup. |
| $authToken = [regex]::Match($npmrc, '(?m)^\s*//\S+:_authToken\s*=\s*(\S+)\s*$') | ||
|
|
||
| if ($password.Success) { | ||
| $token = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($password.Groups[1].Value)) |
| # Written to the user-level .npmrc rather than the repo so the working tree stays | ||
| # clean and every npm/npx invocation is covered regardless of its cwd. | ||
| - pwsh: | | ||
| $npmrc = Join-Path $env:USERPROFILE '.npmrc' |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines: No pipelines were found matching this branch/path. |
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
MountainPass SR21 (SFI Network Isolation) requires pipelines to restore packages through
the Central Feed Service instead of public registries. This pipeline currently pulls from
registry.npmjs.org, which blocks it from running network-isolated.What
New
.ado/templates/configure-npm-feed.ymlwrites an.npmrcpointing at thems/react-native-publicfeed and runsnpmAuthenticate@0, exposingnpmFeedRegistryanda secret
npmFeedAuthToken. It runs before any package is fetched in:templates/yarn-install.yml,templates/strict-yarn-install.ymlbuild-template.yml(inlined copy in Setup)prepare-release-bot.ymlYarn gets
YARN_NPM_REGISTRY_SERVER/_ALWAYS_AUTH/_AUTH_TOKENper step. Verdaccio'suplink now points at the feed, and
verdaccio-stop.ymlrestores the feed registry insteadof
npm config delete registry, which was silently reverting to npmjs.org.windows-vs-pr.ymlandpublish.ymlneed no changes — they extendbuild-template.yml.Notes
credentials, so a checked-in
.npmrcwould break external contributors.networkIsolationPolicyhere. Per the SR21 TSG, YAML policies replace auto-appliedones; onboarding happens via the automatic 7-day lock-in or the
AzRF.Onboardtag.yarn.lockchanges needed (Yarn 4 resolutions carry no absolute URLs).Prerequisite
An npm-type service connection
ms/react-native-public npm Feedmust exist and beauthorized. The existing
ms/react-native-public ADO Feedis NuGet-type and won't work.Microsoft Reviewers: Open in CodeFlow