-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Ability to use local Docker compose binary instead of container. #200
Ability to use local Docker compose binary instead of container. #200
Conversation
539128c
to
1541b94
Compare
|
||
// wait for the compose process to stop, which should only happen after it has spawned all the service containers | ||
p.waitFor(120, TimeUnit.SECONDS); |
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.
Should this timeout be longer, especially to allow for pulling/building of containers..?
I'm not sure there's actually any easy timeout length, so maybe just let it be infinite?
I think it shouldn't be done with an explicit call. I would prefer to do it with an environment variable. We than can run the same java source within different environments without adopting the test to specific environment. |
@qoomon good point. How about we make That way users would be free to define an environment variable (rather than us dictating one) and use that. Alternatively they could just pass in true if there's something about their usage that means this behaviour is always desired. What do you think @outofcoffee ? |
I dont like the idea to check out a project and then are not be able to run all test because of environment dependencies. Therefore i would like to keep dependencies at a bare minimum. |
And i think the problem described is already solved by #189 |
What do you think of #189 @outofcoffee? Does this PR address a different
|
@rnorth #189 solves something different. In this scenario, PWD resolves to a path within the current container; namely the one running the JUnit test. That path is not going to be accessible to the Compose container, so Compose can't see the YAML file. Mounting a volume is also impractical as a work around due to the issue of the buildup of garbage with containers having different lifecycles (compose and the test host container). In short, no, it doesn't work for this scenario. |
4f6da73
to
e1d9070
Compare
@rnorth rebased on master and:
|
@outofcoffee sorry for the numerous delays in looking at this. I will merge. However, please could you rebase onto master and solve the current merge conflicts? |
e1d9070
to
6fabe41
Compare
@rnorth - passed on Travis, but CircleCI failed with:
:-/ |
@pcornish thanks. Docker pull issue = :z |
Purpose
Adds the ability to use local Docker compose binary instead of container.
Rationale
In scenarios where tests are running within a container (such as using Jenkins Docker Plugin), it is difficult for the
docker-compose.yml
file to be bind mounted into the internal Docker compose container used by the currentDockerComposeContainer
implementation.Implementation
Key methods from
DockerCompose
have been extracted to an interface, and a second implementation,LocalDockerCompose
has been added that uses thedocker-compose
on thePATH
.Users call the
withLocalCompose()
method onDockerComposeContainer
to activate this behaviour.