-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Jib CLI WAR] Implement exploded mode for standard WAR #3226
Conversation
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.
Looks good to me.
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/ArtifactProcessor.java
Show resolved
Hide resolved
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/ArtifactLayers.java
Show resolved
Hide resolved
* @param warPath path to WAR file | ||
* @param targetExplodedWarRoot path to exploded-war root | ||
* @param warJavaVersion war java version | ||
* @param appRoot the absolute path of the app on the container |
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.
We don't provide the --appRoot
option yet, right?
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.
Ah good question. Nope, we don't provide the --appRoot
option yet, it will be added when War.class
is implemented. This class will only accept appRoot as an input but the idea is to set it in ArtifactProcessors
. If a base image is specified then the user is expected to provide the appRoot
(otherwise we throw an exception). If a base image is not specified then we create StandardWarExplodedProcessor
with the default jetty app root.
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.
Sounds like a good plan.
If a base image is specified then the user is expected to provide the
appRoot
(otherwise we throw an exception).
Maybe throw an exception only when it's not the jetty
on Docker Hub. I imagine often you set a base image only to use a tag or digest for jetty
, which was the case in #3204.
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, that is a great point! Will have to keep this in mind when implementing ArtifactProcessors
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/war/StandardWarExplodedProcessor.java
Show resolved
Hide resolved
* @param warPath path to WAR file | ||
* @param targetExplodedWarRoot path to exploded-war root | ||
* @param warJavaVersion war java version | ||
* @param appRoot the absolute path of the app on the container |
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.
Sounds like a good plan.
If a base image is specified then the user is expected to provide the
appRoot
(otherwise we throw an exception).
Maybe throw an exception only when it's not the jetty
on Docker Hub. I imagine often you set a base image only to use a tag or digest for jetty
, which was the case in #3204.
Major Changes:
fromJar
(already implemented) andfromWar
, which will contain logic to select mode processors for JARs and WARs respectively.