-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Build and publish browser-enabled Docker image #3199
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3199 +/- ##
=======================================
Coverage 73.23% 73.23%
=======================================
Files 259 259
Lines 19889 19889
=======================================
Hits 14565 14565
+ Misses 4402 4401 -1
- Partials 922 923 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Thanks for this! I just have that one question around the flags and running in headless, but otherwise it looks good.
24ac4bf
to
3923581
Compare
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.
LGTM
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.
LGTM.
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.
LGTM!
Are you going to squash this PR if not I would recommend force pushing to fix the fixup
s
@mstoykov, my plan is to rebase and squash the fixup commits before merging. |
3923581
to
a5fb29c
Compare
What?
This PR adds a stage to the Dockerfile that adds
chromium
to the Docker image and enables k6 Browser API. The new stage is used to build and publish images with-with-browser
label suffix.The resulting image is fairly large (~220MB compressed compared to ~16MB without
chromium
installed), hence a separate label for those who want to opt-in to use Browser API.Why?
Currently there is no easy way to use Browser API when running k6 as a Docker container. This makes it difficult to run browser-based tests in CI, since users need to first launch browser process in a separate container, provide the CDP URL to the k6 container and conditionally use
browser.connect()
instead ofbrowser.launch()
in their test scripts.Checklist
Related PR(s)/Issue(s)
Closes #2914