Skip to content

Use both NPM_CONFIG_USERCONFIG and NPM_CONFIG_REGISTRY to give the pi…#14463

Merged
chidozieononiwu merged 1 commit intoAzure:mainfrom
chidozieononiwu:NpmConfigEnvVar
Mar 11, 2026
Merged

Use both NPM_CONFIG_USERCONFIG and NPM_CONFIG_REGISTRY to give the pi…#14463
chidozieononiwu merged 1 commit intoAzure:mainfrom
chidozieononiwu:NpmConfigEnvVar

Conversation

@chidozieononiwu
Copy link
Member

@chidozieononiwu chidozieononiwu commented Mar 11, 2026

  • Use both NPM_CONFIG_USERCONFIG and NPM_CONFIG_REGISTRY to give the pipeline more flexibility.
  • NPM_CONFIG_REGISTRY overrides all other registry settings in .npmrc
  • Revert npm-publish.yml to only create authenticated .npmrc when publishing to DevOps

@chidozieononiwu chidozieononiwu requested a review from a team as a code owner March 11, 2026 17:36
Copilot AI review requested due to automatic review settings March 11, 2026 17:36
Copy link
Contributor

Copilot AI left a comment

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 shared Azure Pipelines templates under eng/common to make npm registry configuration more flexible via NPM_CONFIG_USERCONFIG and NPM_CONFIG_REGISTRY, and refines when authenticated .npmrc files are created during npm publishing.

Changes:

  • Add an optional NpmConfigRegistry parameter and plumb it into template step environments as NPM_CONFIG_REGISTRY.
  • Remove SkipAuthentication from create-authenticated-npmrc.yml, making authentication behavior consistent.
  • Adjust npm-publish.yml so authenticated .npmrc creation happens only for non-npmjs publishing paths.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
eng/common/pipelines/templates/steps/update-docsms-metadata.yml Adds NpmConfigRegistry parameter and exports it as NPM_CONFIG_REGISTRY for the DocsMS metadata update script.
eng/common/pipelines/templates/steps/create-tags-and-git-release.yml Switches npm config support toward registry override for the git release tagging step.
eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml Removes SkipAuthentication and always runs npmAuthenticate@0 after generating .npmrc.
eng/common/pipelines/templates/jobs/npm-publish.yml Moves authenticated .npmrc creation into the non-npmjs publishing branch.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

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

Looks g2g to me. Please run one check of the nightly alpha build with these latest changes. You confirmed that standard release is working.

chidozieononiwu added a commit to Azure/azure-sdk-for-js that referenced this pull request Mar 11, 2026
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#14463 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
chidozieononiwu added a commit to Azure/azure-sdk-for-rust that referenced this pull request Mar 11, 2026
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#14463 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
@chidozieononiwu chidozieononiwu merged commit 0c613ca into Azure:main Mar 11, 2026
4 of 7 checks passed
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.

5 participants