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

Add remote docker chrome target for CI server #129

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

MaciejJaroszewski
Copy link

PR resolves:

  1. Problem with connect to external docker image with chrome-headless
  2. Problem with navigating through different stories via iframes - probably bumping dependencies, additional configuration serve-handler and increasing timeout would help
  3. process exits when all test passes - after fix first and second problem, all tests would pass if correct, but proces didn't exit and circle CI waiting for 10 minutes and after that CI server kill process and throw error (circleCI timeout)

Thanks @dbartholomae for initial commits.

Resolve issue #94

Daniel Bartholomae and others added 12 commits December 2, 2018 16:46
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.
@koshov
Copy link

koshov commented Apr 5, 2019

@MaciejJaroszewski thank you for pushing this forward!
I tested your fork on one of my projects, but am still getting the Timeout on CircleCI. Have you been able to revisit this? I would be happy to lend a hand if there are any details on what is outstanding to get Loki working on CircleCI.

@oblador oblador force-pushed the master branch 2 times, most recently from 74f310e to b8b5e98 Compare September 25, 2019 07:24
@codrin-iftimie
Copy link

I know I'm late to the party, but would it be easier to use the "chrome.app" as the target in this case?
And have the loki.config.js file select which one should be used as target based on a ENV variable, like CI
Something like:

// loki.config.js

module.exports = {
  configurations: {
    desktop: {
      target: process.env.CI ? "chrome.app" : "chrome.docker",
      width: 1366,
      height: 768,
      deviceScaleFactor: 1,
      mobile: false,
    },
  },
};

@kadosa
Copy link

kadosa commented Nov 28, 2022

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 chrome.docker on CircleCI?

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

Successfully merging this pull request may close these issues.

5 participants