Use authenticated npmrc#7178
Open
chidozieononiwu wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the archetype-sdk-client Azure DevOps pipeline job to ensure npm operations run with an authenticated, job-scoped .npmrc, improving reliability when installing npm tools and generating docs artifacts.
Changes:
- Add the shared
create-authenticated-npmrc.ymlstep to generate/authenticate an.npmrcunder$(Agent.TempDirectory). - Configure
npm install -g moxygento use the authenticated.npmrcvianpm_config_userconfig. - Configure the docs.ms artifact generation PowerShell task to use the same authenticated
.npmrc(so any npm usage inside the script is authenticated).
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.
This pull request updates the Azure DevOps pipeline for the SDK client archetype to ensure authenticated npm operations by configuring a custom
.npmrcfile. The changes focus on securely providing npm credentials for steps that require npm access, particularly when installing global npm packages and generating documentation artifacts.Pipeline authentication improvements:
create-authenticated-npmrc.ymltemplate step to generate an authenticated.npmrcfile at$(Agent.TempDirectory)/gen_release/.npmrcfor use during pipeline execution.npm install -g moxygenstep to use the authenticated.npmrcby setting thenpm_config_userconfigenvironment variable, ensuring npm commands have the necessary credentials.npm_config_userconfigenvironment variable for the documentation artifact generation step, so any npm usage in this context also uses the authenticated.npmrc.