Sync eng/common directory with azure-sdk-tools for PR 14405#45568
Sync eng/common directory with azure-sdk-tools for PR 14405#45568chidozieononiwu merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Syncs eng/common pipeline templates with azure-sdk-tools (per azure-sdk-tools PR 14405), primarily to improve npm configuration/auth handling in common pipeline steps.
Changes:
- Add optional
NpmConfigUserConfigpipeline parameter support and plumb it through asNPM_CONFIG_USERCONFIGin relevant steps. - Extend
create-authenticated-npmrc.ymlwith aSkipAuthenticationparameter to optionally skipnpmAuthenticate. - Adjust npm publish job flow to create a
.npmrcearlier (before branching on registry).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/common/pipelines/templates/steps/update-docsms-metadata.yml | Adds NpmConfigUserConfig parameter and conditionally exports NPM_CONFIG_USERCONFIG for the DocsMS update script step. |
| eng/common/pipelines/templates/steps/create-tags-and-git-release.yml | Adds NpmConfigUserConfig parameter and conditionally exports NPM_CONFIG_USERCONFIG for the release script step. |
| eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml | Adds SkipAuthentication boolean to optionally skip the npmAuthenticate@0 task. |
| eng/common/pipelines/templates/jobs/npm-publish.yml | Moves .npmrc creation earlier (unconditional) and removes the previous per-registry .npmrc setup branch. |
| - template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml | ||
| parameters: | ||
| npmrcPath: $(ArtifactPath)/.npmrc | ||
| registryUrl: ${{ parameters.Registry }} | ||
| CustomCondition: and(succeeded(), ne(variables['SkipPublishing'], 'true')) | ||
|
|
There was a problem hiding this comment.
In npm-publish.yml the .npmrc is now created under $(ArtifactPath) for all registries, but the subsequent Verify tag after ESRP release step (npmjs.org branch) runs npm view ... without workingDirectory: $(ArtifactPath) (and without setting NPM_CONFIG_USERCONFIG). With the removal of the prior registry reset step, npm view may use the agent/global npm config instead of the intended registry, causing tag verification to query the wrong feed. Consider either setting workingDirectory: $(ArtifactPath) (or env: NPM_CONFIG_USERCONFIG=$(ArtifactPath)/.npmrc) on the verification step, or restoring an explicit registry override before running npm view.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#14405 See eng/common workflow