Use both NPM_CONFIG_USERCONFIG and NPM_CONFIG_REGISTRY to give the pi…#14463
Use both NPM_CONFIG_USERCONFIG and NPM_CONFIG_REGISTRY to give the pi…#14463chidozieononiwu merged 1 commit intoAzure:mainfrom
Conversation
There was a problem hiding this comment.
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
NpmConfigRegistryparameter and plumb it into template step environments asNPM_CONFIG_REGISTRY. - Remove
SkipAuthenticationfromcreate-authenticated-npmrc.yml, making authentication behavior consistent. - Adjust
npm-publish.ymlso authenticated.npmrccreation 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. |
eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
Outdated
Show resolved
Hide resolved
eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml
Outdated
Show resolved
Hide resolved
5b901d3 to
88e7490
Compare
…peline more flexibility
88e7490 to
5984782
Compare
|
The following pipelines have been queued for testing: |
scbedd
left a comment
There was a problem hiding this comment.
Looks g2g to me. Please run one check of the nightly alpha build with these latest changes. You confirmed that standard release is working.
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>
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>
NPM_CONFIG_USERCONFIGandNPM_CONFIG_REGISTRYto give the pipeline more flexibility.NPM_CONFIG_REGISTRYoverrides all other registry settings in.npmrcnpm-publish.ymlto only create authenticated.npmrcwhen publishing to DevOps