docker-maven-plugin icon indicating copy to clipboard operation
docker-maven-plugin copied to clipboard

Fix #38 Images that should be pushed but not kept are now deleted

Open Ardesco opened this issue 9 years ago • 3 comments

There is no good way to share information between MOJO's so I've used a maven property to pass over a comma separated list of image IDs.

Ardesco avatar Feb 16 '16 08:02 Ardesco

Hi Mike,

Thanks for the PR. Actually, you can share state between Mojos, via the PluginContext. See AbstractDockerMojo#obtainListFromPluginContext()

For the rest, this looks great. :)

wouterd avatar Feb 16 '16 09:02 wouterd

Close, it's Mark :)

DOH! I've been looking at this the wrong way. I didn't push stuff up into the AbstractDockerMojo because I didn't want to cause a conflict between List<ImageBuildConfiguration> images in BuildImageMojo and List<ImageTagConfiguration> images in TagImageMojo.

What I should have done is just define a list in AbstractDockerMojo instead of loading the data I care about sharing into a property.

I'll refactor it on the train on the way home tonight.

Ardesco avatar Feb 16 '16 10:02 Ardesco

All done now, let me know if there's anything else outstanding.

Ardesco avatar Feb 16 '16 17:02 Ardesco