-
Notifications
You must be signed in to change notification settings - Fork 535
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
Add bundle analysis collection and publish steps #3149
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,10 @@ parameters: | |
type: boolean | ||
default: true | ||
|
||
- name: runBundleAnalysis | ||
type: boolean | ||
default: false | ||
|
||
trigger: none | ||
|
||
variables: | ||
|
@@ -84,7 +88,7 @@ stages: | |
|
||
- task: UseNode@1 | ||
displayName: Use Node 12.x | ||
inputs: | ||
inputs: | ||
version: 12.x | ||
|
||
- task: Bash@3 | ||
|
@@ -213,6 +217,23 @@ stages: | |
ArtifactName: 'pack' | ||
publishLocation: 'Container' | ||
|
||
# Collect bundle analysis | ||
- ${{ if eq(parameters.runBundleAnalysis, true) }}: | ||
- task: Npm@1 | ||
displayName: npm run bundle-analysis | ||
inputs: | ||
command: 'custom' | ||
workingDir: ${{ parameters.buildDirectory }} | ||
customCommand: 'run bundle-analysis' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish Artifacts - bundle-analysis | ||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) | ||
inputs: | ||
PathtoPublish: '${{ parameters.buildDirectory }}/artifacts/bundleAnalysis' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a different path than used for the Docs one below, is that intentional? How did you choose this path? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the path to the stuff that gets published; this just happened to be where the bundle analysis stuff went. it may be better to group it all closer together? not sure it matters much though. |
||
Artifactname: 'bundleAnalysis' | ||
publishLocation: 'Container' | ||
|
||
# Docs | ||
- ${{ if ne(parameters.taskBuildDocs, false) }}: | ||
- task: Npm@1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
succeeded()
is set based on the previous task? That's cool.