Add remote docker chrome target for CI server#129
Open
MaciejJaroszewski wants to merge 12 commits intooblador:masterfrom
Open
Add remote docker chrome target for CI server#129MaciejJaroszewski wants to merge 12 commits intooblador:masterfrom
MaciejJaroszewski wants to merge 12 commits intooblador:masterfrom
Conversation
It is the URL where storybook is running, not where docker is running
They will be needed for the new existing-docker-target. This also makes the code more readable.
This adds a new target for running storybook in chrome on an existing docker container. The target isn't exported directly, but as a variant of the chromeDockerTarget to make it possible to let Loki run docker on a local machine while enabling the use of an existing container with a flag on the CI. This way the same target config can be used on local and on the CI. The biggest challenge with this change was to provide access to local files as we cannot assume that the external headless chrome docker container has access to those. Instead Loki will run a small static server to serve the file and direct the headless chrome towards this page. Two new packages are added: bluebird for better promise handling, especially timeouts, and serve-handler to serve the static directory. All changes are behind the chromeDockerUseExisting flag which is false by default, so there should be no breaking changes.
|
@MaciejJaroszewski thank you for pushing this forward! |
74f310e to
b8b5e98
Compare
|
I know I'm late to the party, but would it be easier to use the // loki.config.js
module.exports = {
configurations: {
desktop: {
target: process.env.CI ? "chrome.app" : "chrome.docker",
width: 1366,
height: 768,
deviceScaleFactor: 1,
mobile: false,
},
},
}; |
|
I know this PR is quite old, but I'm wondering if there's a chance to get this looked at again? Or if there's a suggested way of using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR resolves:
Thanks @dbartholomae for initial commits.
Resolve issue #94