Skip to content

Sync eng/common directory with azure-sdk-tools for PR 14353#48257

Merged
chidozieononiwu merged 2 commits intomainfrom
sync-eng/common-AllowNpmJSAccess-14353
Mar 5, 2026
Merged

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

Conversation

@azure-sdk
Copy link
Collaborator

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

Copilot AI review requested due to automatic review settings March 5, 2026 01:19
@azure-sdk azure-sdk requested a review from a team as a code owner March 5, 2026 01:19
@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 5, 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 logic with azure-sdk-tools PR 14353 by introducing a reusable step for resetting the npm registry and using it from the npm publish job.

Changes:

  • Added a new reset-npmrc.yml step template to set the project npm registry.
  • Updated npm-publish.yml to use the new template instead of deleting .npmrc.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
eng/common/pipelines/templates/steps/reset-npmrc.yml New step template to reset npm registry configuration for the current project.
eng/common/pipelines/templates/jobs/npm-publish.yml Swaps inline .npmrc deletion with the new reset-npmrc step template for npmjs publishing.
Comments suppressed due to low confidence (1)

eng/common/pipelines/templates/steps/reset-npmrc.yml:7

  • This template always runs the PowerShell task (no condition). To be consistent with other step templates and to avoid failing jobs that intentionally skip publishing, consider adding a CustomCondition parameter (defaulting to succeeded()) and applying it to the task via condition: ${{ parameters.CustomCondition }}.
parameters:
  Registry: 'https://registry.npmjs.org/'
  
steps:
  - task: PowerShell@2
    displayName: 'Set project npm registry'
    inputs:

Write-Host "No repo .npmrc found at $npmrcPath."
}
pwsh: true
- template: /eng/common/pipelines/templates/steps/reset-npmrc.yml
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The new reset-npmrc template step is invoked unconditionally. Previously the deleted-.npmrc step had condition: and(succeeded(), ne(variables['SkipPublishing'], 'true')); without that, a build with no packages (SkipPublishing=true) will still run npm config ... and can fail the job even though publishing is meant to be skipped. Add the same condition to the template invocation or have the template accept a CustomCondition parameter and apply it to the task.

Suggested change
- template: /eng/common/pipelines/templates/steps/reset-npmrc.yml
- template: /eng/common/pipelines/templates/steps/reset-npmrc.yml
condition: and(succeeded(), ne(variables['SkipPublishing'], 'true'))

Copilot uses AI. Check for mistakes.
@chidozieononiwu chidozieononiwu merged commit 5678a33 into main Mar 5, 2026
15 of 21 checks passed
@chidozieononiwu chidozieononiwu deleted the sync-eng/common-AllowNpmJSAccess-14353 branch March 5, 2026 01:26
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