Skip to content

Use authenticated npmrc#7178

Open
chidozieononiwu wants to merge 1 commit into
mainfrom
net-iso
Open

Use authenticated npmrc#7178
chidozieononiwu wants to merge 1 commit into
mainfrom
net-iso

Conversation

@chidozieononiwu

Copy link
Copy Markdown
Member

This pull request updates the Azure DevOps pipeline for the SDK client archetype to ensure authenticated npm operations by configuring a custom .npmrc file. 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:

  • Added the create-authenticated-npmrc.yml template step to generate an authenticated .npmrc file at $(Agent.TempDirectory)/gen_release/.npmrc for use during pipeline execution.
  • Updated the npm install -g moxygen step to use the authenticated .npmrc by setting the npm_config_userconfig environment variable, ensuring npm commands have the necessary credentials.
  • Set the npm_config_userconfig environment variable for the documentation artifact generation step, so any npm usage in this context also uses the authenticated .npmrc.

@chidozieononiwu chidozieononiwu self-assigned this Jun 18, 2026
Copilot AI review requested due to automatic review settings June 18, 2026 04:35

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

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.yml step to generate/authenticate an .npmrc under $(Agent.TempDirectory).
  • Configure npm install -g moxygen to use the authenticated .npmrc via npm_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).

Comment thread eng/pipelines/templates/jobs/archetype-sdk-client.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants