-
Notifications
You must be signed in to change notification settings - Fork 642
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
Build image(s) conditionally #1313
Comments
I'm afraid I don't have a good answer. Maven profiles' plugin configuration can not easily be combined when multiple profiles are activated. So if you split the image configuration over multiple profiles then you would have to call Maven for each profile separately. The only way I know how to combine plugin configurations is via inheritance like e.g. described in https://blog.sonatype.com/2011/01/maven-how-to-merging-plugin-configuration-in-complex-projects/ Even here the complex configuration of dmp might not be a good fit here. You can also try to use the other configuration options, like plain Dockerfiles or the property based configuration as described in the documentation. |
Thanks @rhuss . I was thinking that adding a flag to |
We already have several skip options on various levels, so they might be already achieve what you need ? See https://dmp.fabric8.io/ and look for But probably the new alternative configuration syntax might be useful to you, which allows easy merging of image configuration. This has just been released as part of 0.32.0. See the documentation https://dmp.fabric8.io/#image-configuration, check for |
Oh, great! That's exactly what I needed! Sorry, I had totally not seen that, or maybe it wasn't there when I looked (0.32.0 was not out yet). |
Description
We would like to have the ability to specify which image(s) to build, or not, using Maven profiles.
Since the configuration is a monolithic XML block or file, it's impossible to build a certain image only if a certain precondition is met (e.g. build the frontend HTTP server only if I'm building the frontend).
Duplicating and splitting the d-m-p configuration over multiple profiles is, of course, possible but suboptimal.
Info
mvn -v
) : 3.5.2We have profiles that control whether to build (or not) the frontend and/or that customize the build for specific customers. However, we cannot easily combine those with d-m-p.
The text was updated successfully, but these errors were encountered: