Skip to content

Commit 2081ff6

Browse files
iclantonclaude
andcommitted
Add package packing and artifact publishing to AzDO pipelines
Refactor npm-publish and npm-publish-rush pipelines to pack all packages and publish them as pipeline artifacts in addition to publishing to npm. Add a publishToNpmFeed parameter (default: true) to optionally disable npm feed publishing and only produce pipeline artifacts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 98334a9 commit 2081ff6

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

common/config/azure-pipelines/npm-publish-rush.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
parameters:
2+
- name: publishToNpmFeed
3+
displayName: 'Publish to npm feed'
4+
type: boolean
5+
default: true
6+
17
variables:
28
- name: FORCE_COLOR
39
value: 1
@@ -32,6 +38,9 @@ extends:
3238
- output: pipelineArtifact
3339
targetPath: $(Build.ArtifactStagingDirectory)/json-schemas
3440
artifactName: json-schemas
41+
- output: pipelineArtifact
42+
targetPath: $(Build.ArtifactStagingDirectory)/packages
43+
artifactName: packages
3544
steps:
3645
- checkout: self
3746
persistCredentials: true
@@ -53,14 +62,18 @@ extends:
5362
- script: 'node libraries/rush-lib/scripts/plugins-prepublish.js'
5463
displayName: 'Prepublish workaround for rush-lib'
5564

65+
- template: /common/config/azure-pipelines/templates/pack.yaml@self
66+
5667
- template: /common/config/azure-pipelines/templates/publish.yaml@self
5768
parameters:
5869
VersionPolicyName: noRush
5970
BranchName: $(SourceBranch)
71+
condition: eq('${{ parameters.publishToNpmFeed }}', 'true')
6072

6173
- template: /common/config/azure-pipelines/templates/publish.yaml@self
6274
parameters:
6375
VersionPolicyName: rush
6476
BranchName: $(SourceBranch)
77+
condition: eq('${{ parameters.publishToNpmFeed }}', 'true')
6578

6679
- template: /common/config/azure-pipelines/templates/post-publish.yaml@self

common/config/azure-pipelines/npm-publish.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
parameters:
2+
- name: publishToNpmFeed
3+
displayName: 'Publish to npm feed'
4+
type: boolean
5+
default: true
6+
17
variables:
28
- name: FORCE_COLOR
39
value: 1
@@ -32,6 +38,9 @@ extends:
3238
- output: pipelineArtifact
3339
targetPath: $(Build.ArtifactStagingDirectory)/json-schemas
3440
artifactName: json-schemas
41+
- output: pipelineArtifact
42+
targetPath: $(Build.ArtifactStagingDirectory)/packages
43+
artifactName: packages
3544
steps:
3645
- checkout: self
3746
persistCredentials: true
@@ -48,9 +57,12 @@ extends:
4857
- script: 'node libraries/rush-lib/scripts/plugins-prepublish.js'
4958
displayName: 'Prepublish workaround for rush-lib'
5059

60+
- template: /common/config/azure-pipelines/templates/pack.yaml@self
61+
5162
- template: /common/config/azure-pipelines/templates/publish.yaml@self
5263
parameters:
5364
VersionPolicyName: noRush
5465
BranchName: $(SourceBranch)
66+
condition: eq('${{ parameters.publishToNpmFeed }}', 'true')
5567

5668
- template: /common/config/azure-pipelines/templates/post-publish.yaml@self
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
steps:
2+
- script: 'node common/scripts/install-run-rush.js publish --pack --include-all --release-folder $(Build.ArtifactStagingDirectory)/packages'
3+
displayName: 'Rush Pack'

0 commit comments

Comments
 (0)