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

ci(jenkins): report bundlesize as a GitHub comment #826

Merged
merged 11 commits into from
Jun 29, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Jun 24, 2020

Create markdown file on the fly and populate the content as a GitHub comment. See #826 (comment)

Issues

Closes #667

TODO: Create markdown file on the fly
@apmmachine
Copy link
Contributor

apmmachine commented Jun 24, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #826 updated]

  • Start Time: 2020-06-29T11:11:14.600+0000

  • Duration: 80 min 54 sec

Test stats 🧪

Test Results
Failed 0
Passed 950
Skipped 10
Total 960

Steps errors

Expand to view the steps failures

  • Name: Bundlesize

    • Description: #!/bin/bash set -o pipefail npm run bundlesize|tee bundlesize.txt

    • Duration: 1 min 31 sec

    • Start Time: 2020-06-29T11:16:34.968+0000

    • log

  • Name: Start Elastic Stack 8.0.0-SNAPSHOT - @elastic/apm-rum-core - saucelabs

    • Description:

    • Duration: 7 min 49 sec

    • Start Time: 2020-06-29T11:41:03.084+0000

    • log

  • Name: Error signal

    • Description:

    • Duration: 0 min 0 sec

    • Start Time: 2020-06-29T11:47:51.953+0000

    • log

  • Name: Start Elastic Stack 8.0.0-SNAPSHOT - @elastic/apm-rum - saucelabs

    • Description:

    • Duration: 7 min 35 sec

    • Start Time: 2020-06-29T11:51:51.089+0000

    • log

  • Name: Error signal

    • Description:

    • Duration: 0 min 0 sec

    • Start Time: 2020-06-29T11:58:26.497+0000

    • log

@apmmachine
Copy link
Contributor

apmmachine commented Jun 26, 2020

📦 Bundlesize report

Filename Size(bundled) Size(gzip) Diff(gzip)
elastic-apm-opentracing.umd.min.js 61515 B 19716 B
elastic-apm-rum.umd.min.js 55470 B 18223 B

@elastic elastic deleted a comment from apmmachine Jun 26, 2020
Jenkinsfile Outdated
Comment on lines 3 to 6
@Library('apm@feature/bundlesize-step-1') _

pipeline {
agent { label 'linux && immutable' }
Copy link
Member Author

Choose a reason for hiding this comment

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

for testing purposes

Jenkinsfile Outdated
Comment on lines 12 to 15
PIPELINE_LOG_LEVEL = 'DEBUG'
CODECOV_SECRET = 'secret/apm-team/ci/apm-agent-rum-codecov'
SAUCELABS_SECRET_CORE = 'secret/apm-team/ci/apm-agent-rum-saucelabs@elastic/apm-rum-core'
SAUCELABS_SECRET = 'secret/apm-team/ci/apm-agent-rum-saucelabs@elastic/apm-rum'
Copy link
Member Author

Choose a reason for hiding this comment

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

for testing purposes

Jenkinsfile Outdated
@@ -364,7 +368,8 @@ pipeline {
}
post {
cleanup {
notifyBuildResult()
// bundlesize id was generated previously, see the bundlesize function
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
// bundlesize id was generated previously, see the bundlesize function
// bundlesize id was generated previously, see the lint stage

@v1v v1v marked this pull request as ready for review June 29, 2020 10:09
@v1v v1v removed the in progress label Jun 29, 2020
@v1v v1v requested review from vigneshshanmugam, hmdhk and a team June 29, 2020 10:10
Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

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

@v1v Thanks. PR looks good to me except for the DEBUG flag.

@v1v v1v force-pushed the feature/report-bundlesize branch from a990a52 to f303c7c Compare June 29, 2020 11:11
Copy link
Contributor

@hmdhk hmdhk left a comment

Choose a reason for hiding this comment

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

Thanks @v1v

One minor comment, can we convert the bytes to KB with decimal points? that's a bit easier to read.
Also, it seems the diff part isn't showing anything on this PR, is that because the diff is zero? maybe we should show that as well

@v1v
Copy link
Member Author

v1v commented Jun 29, 2020

One minor comment, can we convert the bytes to KB with decimal points? that's a bit easier to read.
Also, it seems the diff part isn't showing anything on this PR, is that because the diff is zero? maybe we should show that as well

I'll enable the KB format in a follow up, since it requires changes in the jenkins shared library.

it seems the diff part isn't showing anything on this PR,

Good point, this will change as soon as this PR gets merged, then there will be something to compare with, at the moment this PR is the only one with the bundlesize reporting

@hmdhk hmdhk merged commit 79370d3 into elastic:master Jun 29, 2020
@vigneshshanmugam
Copy link
Member

@v1v Not able to see the diff in this PR - #825 (comment)

@v1v
Copy link
Member Author

v1v commented Jun 29, 2020

@v1v Not able to see the diff in this PR - #825 (comment)

I think the master branch was not yet available with the report -> see here

Since there is already a json file in the master build then you should see the comment as expected in the next build.

I'll rebuild your PR to see if it behaves as expected

@v1v v1v deleted the feature/report-bundlesize branch June 30, 2020 08:32
v1v added a commit to v1v/apm-agent-rum-js that referenced this pull request Jul 3, 2020
* upstream/master: (23 commits)
  feat(rum-core): capture XHR/Fetch spans using resource timing (elastic#825)
  docs: update set-up.asciidoc (elastic#814)
  chore: remove compressed size gh workflow (elastic#828)
  feat: use page visibilityState for browser responsiveness check (elastic#813)
  ci(jenkins): report bundlesize as a GitHub comment (elastic#826)
  docs: release notes for 5.2.1 (elastic#824)
  chore(release): publish
  fix(rum-core): protect aganist buggy navigation timing data (elastic#819)
  fix(rum-core): protect aganist buggy navigation timing data (elastic#819)
  chore(rum-core): use startTime for LCP marks (elastic#815)
  fix(rum-core): capture tbt after all task entries are observed (elastic#803)
  feat(rum-react): use correct path when route is path array (elastic#800)
  ci: enable benchmark on a PR basis (elastic#812)
  ci: use dockerLogs step (elastic#810)
  fix: env var invalid type (elastic#809)
  fix: workarount for elastic/beats#18858 (elastic#807)
  docs: add release notes for 5.2.0 (elastic#801)
  chore(release): publish
  fix(rum-core): consider user defined type of high precedence (elastic#798)
  fix(rum): use single instance of apm across all packages (elastic#796)
  ...
David-Development pushed a commit to David-Development/apm-agent-rum-js that referenced this pull request Oct 20, 2021
* ci(jenkins): report bundlesize as a GitHub comment

TODO: Create markdown file on the fly

* ci: stash outside of the shell step

* ci: revert changes

* ci: use current

* ci: use step

* ci: for testing purposes

* ci: call the step

* ci: debugging purposes

* ci: use the worker instead

* ci: no in the docker container

* ci: use current branch and change comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Bundle details as a comment in PRs
5 participants