Skip to content

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

Open
azure-sdk wants to merge 2 commits intomainfrom
sync-eng/common-AllowNpmJSAccess-14405
Open

Sync eng/common directory with azure-sdk-tools for PR 14405#9708
azure-sdk wants to merge 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:09
@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 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 NpmConfigUserConfig parameter support and pass it via NPM_CONFIG_USERCONFIG env var in relevant steps.
  • Add SkipAuthentication parameter to optionally skip npmAuthenticate@0 when creating an .npmrc.
  • Adjust npm-publish flow to always create an .npmrc up-front (and remove the npmjs-specific reset-npmrc step).

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.

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.

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.

Copilot uses AI. Check for mistakes.
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