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
[WFMP-174] New image goal to build (and push) application image #253
Conversation
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Show resolved
Hide resolved
e8c4786
to
d29b91c
Compare
9dd5abc
to
734e008
Compare
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Show resolved
Hide resolved
734e008
to
061605b
Compare
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.
Just some minor comments mostly related to documentation.
One thing that could be interesting to add too, in a later PR even, is to if the password is empty prompt the user for one. We do something like this in ClientCallbackHandler
using the System.console()
.
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/wildfly/plugin/provision/ApplicationImageMojo.java
Outdated
Show resolved
Hide resolved
String... args) { | ||
try { | ||
Process process = startProcess(directory, command, args); | ||
new HandleOutput(process.getInputStream(), log).run(); |
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.
Is there a reason we're not launching this in a new thread? It seems like we should to ensure we get all the content.
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.
I'm not sure why we would need to.
The Process
is started on its own thread and we are redirecting its input to log it in the main thread.
We are then waiting for the process to finish up. We should have all the content displayed when the process is finished
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.
I definitely could be wrong, but won't it block until the process is complete? I guess this one is done without a timeout so maybe not a big deal and the next process.waitFor()
would block anyway. It probably doesn't matter, just looked strange to me I suppose :)
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.
yes, this one will block until the process is complete.
There is no timeout on this one (eg building the docker image can take as many time as it needs)
061605b
to
47b3abb
Compare
As an user, I want to build and push an application image from the plugin JIRA: https://issues.redhat.com/browse/WFMP-174 Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
47b3abb
to
85cb3bf
Compare
As an user, I want to build and push an application image from the plugin
https://issues.redhat.com/browse/WFMP-174
image
goalSigned-off-by: Jeff Mesnil jmesnil@redhat.com