-
Notifications
You must be signed in to change notification settings - Fork 640
-
Notifications
You must be signed in to change notification settings - Fork 640
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
PR Proposal: Expose maven properties to the execution of wait configurations. #1111
Comments
Yes, that makes absolute sense. Appreciate any PR which we could integrate to fix this issue. thanks ! |
blaxx
pushed a commit
to blaxx/docker-maven-plugin
that referenced
this issue
Oct 13, 2018
…tartMojo to StartContainerExecution in order to provide container properties to the wait configuration execution.
rohanKanojia
pushed a commit
to rohanKanojia/docker-maven-plugin
that referenced
this issue
Nov 28, 2018
…tartMojo to StartContainerExecution in order to provide container properties to the wait configuration execution.
rhuss
pushed a commit
that referenced
this issue
Dec 12, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Info
Use Case
We are using Jenkins in a docker container to run builds and integration tests. The test server we run the integration tests against is a docker container as well. In order to avoid a docker-in-docker situation, the daemon socket is exposed to the jenkins container via
-v /var/run/docker.sock:/var/run/docker.sock
, which results in the two containers being siblings rather than parent and child. As such, they share the same network (bridge), which also means ´localhost´ from within the jenkins container points to the jenkins container and not the docker host. It would be great if we could use the IP assigned to the container to ping for readiness (and to deploy integration tests eventually).Problem
Given the following image configuration for the test server:
This results in an IllegalArgumentException
Illegal character in authority at index 7: http://${docker.container.aem.ip}:4502/bin/aemready
when trying to construct the URI for the HttpPingChecker from an url containing a$
character. Indeed, by looking at the code it seems that the wait configuration is executed by the StartContainerExecutor as part of the start routine, at which point the code exposing container properties simply has not run yet.Proposal
With a small modification to the StartContainerExecutor, the code responsible for exposing the container properties to maven could run as soon as we have successfully obtained a container id. Essentially this means extending the Builder to gain access to the global
<exposeContainerProps>
as well as moving theexposeContainerProps()
method from the Mojo into the StartContainerExecutor.So what do you think. Does this sound useful to you at all? If so, just let me know, I'd be happy to supply a corresponding pull request.
Cheers guys,
blaxx
The text was updated successfully, but these errors were encountered: