-
Notifications
You must be signed in to change notification settings - Fork 707
Updating the publish pipelines for NPM packages #5953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
David Michon (dmichon-msft)
merged 16 commits into
main
from
copilot/update-publish-pipelines
Aug 21, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1136883
chore: move npm publishing to release stage
Copilot 51e2dfa
chore: prune npmjs registry from npmrc files
Copilot eaa1337
ci: add version bump pipeline
Copilot 41dc6c1
ci: split npm publish from version bump
Copilot cb5caad
ci: resolve bump pipeline by name
Copilot 7fcb198
ci: two bump pipelines and shared esrp publish pipelines
Copilot 17a706a
ci: reference bump pipelines by definition id
Copilot 1453ec8
ci: point post-publish at esrp publish pipelines in GitHubProjectsPub…
Copilot cbf98d0
Require bump pipeline definition ID
Copilot 8881781
Set publish registry to package feed proxy
Copilot c8bbaae
Address publish pipeline review feedback
Copilot cc6d9b4
Update changelogs [skip ci]
rushbot 3d0cb9e
Bump versions [skip ci]
rushbot fc3a7a4
Fix manual version bump commit flow
Copilot eb01554
Use safe bump tag delimiter
Copilot 2602e93
Add network isolation policy to Official Azure pipelines
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Pipeline: rushstack-esrp-publish-rush (AzDO project GitHubProjectsPublish) | ||
| # Trigger: Automatically when a version bump PR from the Rush bump pipeline (definition 12) merges to main. | ||
| # Purpose: Publish the tarballs packed by that bump pipeline run to the npm feed via ESRP. | ||
|
|
||
| trigger: | ||
| branches: | ||
| include: | ||
| - main | ||
| paths: | ||
| include: | ||
| - '**/CHANGELOG.md' | ||
| - 'common/config/rush/version-policies.json' | ||
|
|
||
| pr: none | ||
|
|
||
| parameters: | ||
| - name: publishToNpmFeed | ||
| displayName: 'Publish to npm feed' | ||
| type: boolean | ||
| default: true | ||
| - name: NpmTag | ||
| displayName: 'NPM dist-tag' | ||
| type: string | ||
| default: latest | ||
| - name: DryRun | ||
| displayName: 'Dry run' | ||
| type: boolean | ||
| default: false | ||
| - name: CommitShaOverride | ||
| displayName: 'Commit SHA Override (for testing)' | ||
| type: string | ||
| default: '' | ||
|
|
||
| variables: | ||
| - name: FORCE_COLOR | ||
| value: 1 | ||
| - name: PackagesPath | ||
| value: $(Pipeline.Workspace)/packages | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: 1esPipelines | ||
| type: git | ||
| name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
| ref: refs/tags/release | ||
| - repository: publishConfig | ||
| type: git | ||
| name: GitHubProjectsPublish/GitHubProjectsPublish | ||
| ref: refs/heads/main | ||
|
|
||
| extends: | ||
| template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines | ||
| parameters: | ||
| settings: | ||
| networkIsolationPolicy: CFSClean,CFSClean2,CFSClean3,DefaultDeny | ||
| pool: | ||
| name: Azure-Pipelines-1ESPT-ExDShared | ||
| os: windows | ||
| stages: | ||
| - template: /common/config/azure-pipelines/templates/esrp-publish-stages.yaml@self | ||
| parameters: | ||
| # https://dev.azure.com/RushStack/GitHubProjects/_build?definitionId=12 | ||
| BumpPipelineId: 12 | ||
| BumpPipelineProject: GitHubProjects | ||
| StageNameSuffix: Rush | ||
| DisplayNameSuffix: Rush | ||
| PublishToNpmFeed: ${{ parameters.publishToNpmFeed }} | ||
| NpmTag: ${{ parameters.NpmTag }} | ||
| DryRun: ${{ parameters.DryRun }} | ||
| CommitShaOverride: ${{ parameters.CommitShaOverride }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Pipeline: rushstack-esrp-publish (AzDO project GitHubProjectsPublish) | ||
| # Trigger: Automatically when a version bump PR from the non-Rush bump pipeline (definition 10) merges to main. | ||
| # Purpose: Publish the tarballs packed by that bump pipeline run to the npm feed via ESRP. | ||
|
|
||
| trigger: | ||
| branches: | ||
| include: | ||
| - main | ||
| paths: | ||
| include: | ||
| - '**/CHANGELOG.md' | ||
| - 'common/config/rush/version-policies.json' | ||
|
|
||
| pr: none | ||
|
|
||
| parameters: | ||
| - name: publishToNpmFeed | ||
| displayName: 'Publish to npm feed' | ||
| type: boolean | ||
| default: true | ||
| - name: NpmTag | ||
| displayName: 'NPM dist-tag' | ||
| type: string | ||
| default: latest | ||
| - name: DryRun | ||
| displayName: 'Dry run' | ||
| type: boolean | ||
| default: false | ||
| - name: CommitShaOverride | ||
| displayName: 'Commit SHA Override (for testing)' | ||
| type: string | ||
| default: '' | ||
|
|
||
| variables: | ||
| - name: FORCE_COLOR | ||
| value: 1 | ||
| - name: PackagesPath | ||
| value: $(Pipeline.Workspace)/packages | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: 1esPipelines | ||
| type: git | ||
| name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
| ref: refs/tags/release | ||
| - repository: publishConfig | ||
| type: git | ||
| name: GitHubProjectsPublish/GitHubProjectsPublish | ||
| ref: refs/heads/main | ||
|
|
||
| extends: | ||
| template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines | ||
| parameters: | ||
| settings: | ||
| networkIsolationPolicy: CFSClean,CFSClean2,CFSClean3,DefaultDeny | ||
| pool: | ||
| name: Azure-Pipelines-1ESPT-ExDShared | ||
| os: windows | ||
| stages: | ||
| - template: /common/config/azure-pipelines/templates/esrp-publish-stages.yaml@self | ||
| parameters: | ||
| # https://dev.azure.com/RushStack/GitHubProjects/_build?definitionId=10 | ||
| BumpPipelineId: 10 | ||
|
dmichon-msft marked this conversation as resolved.
|
||
| BumpPipelineProject: GitHubProjects | ||
| StageNameSuffix: Rushstack | ||
| DisplayNameSuffix: Rushstack | ||
| PublishToNpmFeed: ${{ parameters.publishToNpmFeed }} | ||
| NpmTag: ${{ parameters.NpmTag }} | ||
| DryRun: ${{ parameters.DryRun }} | ||
| CommitShaOverride: ${{ parameters.CommitShaOverride }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,82 +1,54 @@ | ||
| parameters: | ||
| - name: publishToNpmFeed | ||
| displayName: 'Publish to npm feed' | ||
| type: boolean | ||
| default: true | ||
|
|
||
| variables: | ||
| - name: FORCE_COLOR | ||
| value: 1 | ||
| - name: SourceBranch | ||
| value: $[ replace(replace(resources.repositories.self.ref, 'refs/heads/', ''), 'refs/pull/', 'refs/remotes/pull/') ] | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: 1esPipelines | ||
| type: git | ||
| name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
| ref: refs/tags/release | ||
|
|
||
| extends: | ||
| template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines | ||
| parameters: | ||
| pool: | ||
| name: Azure-Pipelines-1ESPT-ExDShared | ||
| os: windows | ||
| stages: | ||
| - stage: | ||
| jobs: | ||
| - job: | ||
| pool: | ||
| name: publish-rushstack | ||
| os: linux | ||
| templateContext: | ||
| outputParentDirectory: $(Build.ArtifactStagingDirectory) | ||
| outputs: | ||
| - output: pipelineArtifact | ||
| targetPath: $(Build.ArtifactStagingDirectory)/published-versions | ||
| artifactName: published-versions | ||
| - output: pipelineArtifact | ||
| targetPath: $(Build.ArtifactStagingDirectory)/json-schemas | ||
| artifactName: json-schemas | ||
| - output: pipelineArtifact | ||
| targetPath: $(Build.ArtifactStagingDirectory)/packages | ||
| artifactName: packages | ||
| - output: pipelineArtifact | ||
| targetPath: $(Build.ArtifactStagingDirectory)/api | ||
| artifactName: api | ||
| steps: | ||
| - checkout: self | ||
| persistCredentials: true | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/install-node.yaml@self | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/build.yaml@self | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/bump-versions.yaml@self | ||
| parameters: | ||
| VersionPolicyName: noRush | ||
| BranchName: $(SourceBranch) | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/bump-versions.yaml@self | ||
| parameters: | ||
| VersionPolicyName: rush | ||
| BranchName: $(SourceBranch) | ||
|
|
||
| - script: 'node libraries/rush-lib/scripts/plugins-prepublish.js' | ||
| displayName: 'Prepublish workaround for rush-lib' | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/pack.yaml@self | ||
|
|
||
| - ${{ if eq(parameters.publishToNpmFeed, true) }}: | ||
| - template: /common/config/azure-pipelines/templates/publish.yaml@self | ||
| parameters: | ||
| VersionPolicyName: noRush | ||
| BranchName: $(SourceBranch) | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/publish.yaml@self | ||
| parameters: | ||
| VersionPolicyName: rush | ||
| BranchName: $(SourceBranch) | ||
|
|
||
| - template: /common/config/azure-pipelines/templates/post-publish.yaml@self | ||
| # Pipeline: Bump Versions (Rush) -- AzDO definition 12 in the GitHubProjects project | ||
| # Trigger: Automatically when changes merge to main that include change files or pipeline YAML. | ||
| # Purpose: Bump versions for the "rush" version policy, build, pack, create/update GitHub PR. | ||
| # The packed tarballs are published by the "esrp-publish-rush.yaml" pipeline once the | ||
| # resulting version bump PR is merged. | ||
|
|
||
| trigger: | ||
| batch: true | ||
| branches: | ||
| include: | ||
| - main | ||
| paths: | ||
| include: | ||
| - 'common/changes/*' | ||
| - 'common/config/rush/version-policies.json' | ||
| - 'common/config/azure-pipelines/**' | ||
|
|
||
| pr: none | ||
|
|
||
| variables: | ||
| - name: FORCE_COLOR | ||
| value: 1 | ||
| - name: BaseBranch | ||
| value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: 1esPipelines | ||
| type: git | ||
| name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
| ref: refs/tags/release | ||
|
|
||
| extends: | ||
| template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines | ||
| parameters: | ||
| settings: | ||
| networkIsolationPolicy: CFSClean,CFSClean2,CFSClean3,DefaultDeny | ||
| pool: | ||
| name: Azure-Pipelines-1ESPT-ExDShared | ||
| os: windows | ||
| stages: | ||
| - template: /common/config/azure-pipelines/templates/bump-versions-stages.yaml@self | ||
| parameters: | ||
| VersionPolicyName: rush | ||
| StageName: BumpRushVersions | ||
| StageDisplayName: 'Bump Rush Versions and Create PR' | ||
| FeatureBranch: 'automated/bump-versions-rush' | ||
| PrTitle: 'Bump Rush package versions' | ||
| PrDescription: | | ||
| Automated version bump generated by Azure DevOps Pipeline. | ||
|
|
||
| This PR contains version bumps for the "rush" version policy. | ||
|
|
||
| **Pipeline Run:** $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.