-
Notifications
You must be signed in to change notification settings - Fork 644
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
add option so reactor builds only pull an image once #504
Comments
What about adding an |
that works for me - i'll have a PR for this (and hopefully a couple other things, separate of course) in the next few days. |
cool ;-) |
i can't find anywhere on the i know i have come across other plugins that try and offer open to suggestions - i guess the other thing i could do is use a static variable. |
I dont recommend static variables because of possible classloader issues (afaik each module becomes its own classloader, so it depends where your class has been loaded). What I did to share data across different pluging goal executions (in the same module, though) was to put it into the PluginContext. The same should work with Set<String> pulledImages = (Map)session.getExecutionProperties().get(SESSION_AUTO_PULLED_IMAGES);
if (pulledImages == null) {
pulledImages = new HashSet<String>();
session.getExecutionProperties().put(SESSION_AUTO_PULLED_IMAGES, pulledImages);
}
pulledImages.put(imageName); You should use only standard types here (e.g. String) again because of classloading issues. |
ah - i wasn't sure if that could be used. maven documentation is pretty crappy in this department. |
we have a rather large reactor build at the day job that uses the same container(s) over and over for integration testing. we have
autoPull
set toalways
to ensure we always get the latest container when the build starts but then each module in the build pulls the container over and over again which is somewhat needless and increases an already lengthy build time.an additional option should be added (i'm open to naming) that will allow reactor projects to skip pulling images if it has been pulled by a previous module.
overloading
autoPull
w/ some additional values is also another option although i feel it could be confusing. i am happy to go w/ whatever the consensus is.The text was updated successfully, but these errors were encountered: