How to enable maven artifact caching for gitlab ci runner?

后端 未结 8 1931
星月不相逢
星月不相逢 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:34

    You don't have to declare MAVEN_OPTS in variables section when you use CI_PROJECT_DIR variable (The full path where the repository is cloned and where the job is run)

    cache:
        key: maven-cache
        paths:
        - $CI_PROJECT_DIR/.m2/
    

提交回复
热议问题