Sync eng/common directory with azure-sdk-tools for PR 14405#9708
Sync eng/common directory with azure-sdk-tools for PR 14405#9708
Conversation
There was a problem hiding this comment.
Pull request overview
Syncs eng/common pipeline templates with azure-sdk-tools PR 14405 to improve NPM configuration handling (supporting NPM_CONFIG_USERCONFIG) and make npm authentication optional in a shared .npmrc creation step.
Changes:
- Add optional
NpmConfigUserConfigparameter support and pass it viaNPM_CONFIG_USERCONFIGenv var in relevant steps. - Add
SkipAuthenticationparameter to optionally skipnpmAuthenticate@0when creating an.npmrc. - Adjust
npm-publishflow to always create an.npmrcup-front (and remove the npmjs-specificreset-npmrcstep).
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 metadata update script execution. |
| eng/common/pipelines/templates/steps/create-tags-and-git-release.yml | Adds NpmConfigUserConfig parameter and conditionally exports NPM_CONFIG_USERCONFIG for release/tag creation script execution. |
| eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml | Adds SkipAuthentication parameter to optionally skip npmAuthenticate@0. |
| eng/common/pipelines/templates/jobs/npm-publish.yml | Creates .npmrc before branching publish logic; removes npmjs reset-npmrc usage and shifts .npmrc creation earlier. |
| - 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.
This template now creates an .npmrc under $(ArtifactPath), but the later npm view tag-verification step (in the npmjs.org branch) doesn’t run in $(ArtifactPath) and doesn’t pass --registry. With the previous reset-npmrc.yml step removed, tag verification can end up querying an unexpected registry depending on agent/repo npm config. Suggestion: either set workingDirectory: $(ArtifactPath) / NPM_CONFIG_USERCONFIG for the verification step, or pass --registry ${{ parameters.Registry }} to npm view so verification is deterministic.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#14405 See eng/common workflow