How to enable maven artifact caching for gitlab ci runner?

后端 未结 8 1961
星月不相逢
星月不相逢 2020-12-12 17:14

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

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 17:35

    I was able to use a host volume to share my .m2 repository directory. This also had the advantage of sharing over my settings.xml file (which not everyone may want). I found this to be faster than using the cache solutions mentioned.

    [[runners]]
      [runners.docker]
        volumes = ["/home//.m2:/root/.m2"]
    

提交回复
热议问题