We use gitlab ci with shared runners to do our continuous integration. For each build, the runner downloads tons of maven artifacts.
Is there a way to configure gitl
The accepted answer didn't do it for me.
As zlobster mentioned, the guys at GitLab have this amazing repository where you can find a proper example of the .gitlab-ci.yml
file used for Maven projects.
Basically, what you need are these lines:
cache:
paths:
- .m2/repository
Keep in mind that if you decide to a add a local cache for a certain job, the global one added above will be replaced. More on this here.