tophat / jenkins-timeline-plugin

A build timeline to facilitate the inspection of Jenkins pipelines and identify bottlenecks.
https://jenkinstimeline.com
Apache License 2.0
34 stars 11 forks source link

Allow Maven to bake the dependencies in the build env. Docker image #102

Open mcataford opened 3 years ago

mcataford commented 3 years ago

Is your feature request related to a problem? Please describe. Builds using the build Docker environment can be a bit slow because the dependencies need to be pulled down when using it. It would be great to make good use of Maven's offline capabilities to bake all the dependencies in the Docker image so that you just need to build it locally, then use it as much as you want with those dependencies prefetched.

Describe the solution you'd like I'd love to see the build environment set up so that we could leverage mvn dependency:go-offline to pull and cache all the build dependencies when the user builds the build env. Docker image so that any subsequent build doesn't have to pull them from the network again.

Describe alternatives you've considered The status quo -- each build repulls the dependencies via Maven. It's rather expensive time-wise.

Additional context I initially tried to set up a quick Dockerfile based on the maven:3.6.0-jdk-8 image that would call mvn dependency:go-offline during the build process but no dice -- while the image built successfully and pulled down a lot of packages, it seems that some dependencies or artifacts do not get pulled down like the others. It is most certainly something I'm missing about the way Maven works.

Also open to suggestion on how to better handle the build environment w.r.t. to Maven and Docker, if you have any ideas!

Help from any :sparkles: Maven Wizard :sparkles: welcome!