My goal is to be able to build, package and test a java project that is built with maven using a councourse build pipeline.
The setup as such is in place, and everything runs fine, but build times are much too long due to poor maven download rates from our nexus.
My build job yml file uses the following resource as base for the maven build:
# ...
image_resource:
type: docker-image
source:
repository: maven
tag: '3.3-jdk-8'
# ...
I am aware of the fact that having a "blank slate" for every buils is somwhat built into concourse by design.
Now my question is: what would be a good way to cache a local maven repository (say, with at least some basic stuff inside like Spring and it's dependencies)?
Following options come to my mind:
- Using a docker image that has the dependencies built-in already
- Creating a ressource that provides me the needed dependencies
As far as I can see, option 1) will not make the download size for the build smaller, as concourse seems to not cache docker images used as base for the build jobs (or am I wrong here?)
Before I move on, I would like to make sure that following option 2) gives me any advantage - does concourse cache docker images used as ressources?
I might miss out something, as I am relatively new to councourse. So forgive me if I force you to state the obvious here. :)