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

Launching backstopJS container as a "sibling" from within the service-cli container #883

Closed
justinlevi opened this issue Dec 6, 2018 · 5 comments
Assignees

Comments

@justinlevi
Copy link

We are looking to create a local development and CI workflow with visual regression testing using backstopjs.

We have a reasonable workflow established with backstopjs using the official docker container detailed in your blog post here:
https://blog.docksal.io/visual-regression-testing-with-backstopjs-in-a-docker-container-dfd1b9ae8582

This works great on mac but we're looking for a way to launch the backstopjs container as a "sibling" from within the bash cli. I found some documentation on how to do this, but I'm pretty new to docker and I'm feeling kinda lost...
https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

I started playing around with this idea here by updating the docker-cli dockerfile here:
justinlevi/service-cli@51104c4#diff-f5069010bde43f486fa2ec4ffbfa9739

Any thoughts on whether or not this is a good idea and how I might get this to work?

I'm thinking this approach would also allow visual regression tests to run in a CI environment a little easier

@lmakarov
Copy link
Member

lmakarov commented Dec 6, 2018

@justinlevi dind (Docker in Docker) is, probably, not the best approach here.

I'd suggest creating a custom fin command (fin backstop), which would then run your backstop tests. Similar to how you can have fin behat to run Behat tests. This command can be used both locally and in CI.

Take a look at https://github.com/docksal/qa-suite. It has not been updated in a while, but it's a good start anyway.

@lmakarov lmakarov self-assigned this Dec 6, 2018
@justinlevi
Copy link
Author

Thanks for the response. I didn't know about the qa-suite repo. Definitely some ideas in there I think I can adopt for our setup.

One issue we're running into with this approach on Windows though is that Babun doesn't seem to work with docker commands well

babun/babun#655

There is another babun fork that seems to work, but haven't had a chance to try that yet.
https://github.com/tiangolo/babun-docker

To further complicate the situation I'm also looking to run backstopjs on several sites passing in the appropriate config file stored for each site. I'll post back if I can make some progress.

@achekulaev
Copy link
Member

@justinlevi run fin docker <whatever you wanted>. It will run fine.

@achekulaev
Copy link
Member

Any more questions left on this issue or can it be closed?

@achekulaev achekulaev added the stale Issue where initial user does not respond label Jan 4, 2019
@achekulaev
Copy link
Member

Closing for inactivity

@achekulaev achekulaev removed pending stale Issue where initial user does not respond labels Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants