Skip to content

Sync eng/common directory with azure-sdk-tools for PR 14405#45568

Merged
chidozieononiwu merged 2 commits intomainfrom
sync-eng/common-AllowNpmJSAccess-14405
Mar 9, 2026
Merged

Sync eng/common directory with azure-sdk-tools for PR 14405#45568
chidozieononiwu merged 2 commits intomainfrom
sync-eng/common-AllowNpmJSAccess-14405

Conversation

@azure-sdk
Copy link
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#14405 See eng/common workflow

@azure-sdk azure-sdk requested a review from a team as a code owner March 7, 2026 09:10
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Mar 7, 2026
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

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 NpmConfigUserConfig pipeline parameter support and plumb it through as NPM_CONFIG_USERCONFIG in relevant steps.
  • Extend create-authenticated-npmrc.yml with a SkipAuthentication parameter to optionally skip npmAuthenticate.
  • Adjust npm publish job flow to create a .npmrc earlier (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.

Comment on lines +71 to +76
- template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml
parameters:
npmrcPath: $(ArtifactPath)/.npmrc
registryUrl: ${{ parameters.Registry }}
CustomCondition: and(succeeded(), ne(variables['SkipPublishing'], 'true'))

Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@chidozieononiwu chidozieononiwu merged commit b494ea5 into main Mar 9, 2026
25 checks passed
@chidozieononiwu chidozieononiwu deleted the sync-eng/common-AllowNpmJSAccess-14405 branch March 9, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants