Skip to content
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

Create Dedicated Pipeline to Create Tarball Packages #4891

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

atingmicrosoft
Copy link
Contributor

@atingmicrosoft atingmicrosoft commented Aug 15, 2024

Summary

Creates a pipeline dedicated to packaging rushstack packges as tarballs.

Details

Creating a separate pipeline would not interfere with normal npm packaging.

How it was tested

Tested by running the rush publish command use to create tarballs locally.

Impacted documentation

NA

Comment on lines +40 to +42
- output: pipelineArtifact
targetPath: $(Build.ArtifactStagingDirectory)/published-versions
artifactName: published-versions
Copy link
Contributor

Choose a reason for hiding this comment

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

This is how you publish a pipeline artifact. There should be another entry like this pointing to the output folder from the rush publish --pack command; that will produce your artifact for consumption in the separate publish pipeline.

Comment on lines 12 to 16
- name: Publish
${{ if eq(parameters.TestRun, false) }}:
value: '--publish'
${{ else }}:
value: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: Publish
${{ if eq(parameters.TestRun, false) }}:
value: '--publish'
${{ else }}:
value: ''

Comment on lines 60 to 61
parameters:
Publish: $(Publish)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
parameters:
Publish: $(Publish)

default: ''

steps:
- script: 'node common/scripts/install-run-rush.js publish $(Publish) --pack --include-all --release-folder esrp-release'
Copy link
Contributor

Choose a reason for hiding this comment

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

The folder specified under --release-folder should correspond to an output entry in templateContext.outputs.

@@ -0,0 +1,59 @@
parameters:
- name: TestRun
displayName: 'Test Run (Will Not Create Tar Files for Rushstack)'
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering that publishing the artifact does not have any direct consequences, there's no reason to have a dryRun option for this pipeline.

artifactName: published-versions
- output: pipelineArtifact
targetPath: $(Build.ArtifactStagingDirectory)/packages
artifactNames: packages
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
artifactNames: packages
artifactName: packages

Comment on lines 2 to 7
- bash: >
mkdir -p $(Build.ArtifactStagingDirectory)/packages
displyName: 'Create Folder for Packages File'

- script: 'node common/scripts/install-run-rush.js publish --publish --pack --include-all --release-folder esrp-release'
displayName: 'Create TarBallz folder for Rush packages'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- bash: >
mkdir -p $(Build.ArtifactStagingDirectory)/packages
displyName: 'Create Folder for Packages File'
- script: 'node common/scripts/install-run-rush.js publish --publish --pack --include-all --release-folder esrp-release'
displayName: 'Create TarBallz folder for Rush packages'
- script: |
mkdir -p $(Build.ArtifactStagingDirectory)/packages
node common/scripts/install-run-rush.js publish --publish --pack --include-all --release-folder "$(Build.ArtifactStagingDirectory)/packages"
displayName: 'Pack tarballs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants