gitlab 8.2.1, How to use cache in .gitlab-ci.yml

前端 未结 4 1415
感情败类
感情败类 2020-12-14 16:25

I\'m trying to use \'cache\' in .gitlab-ci.yml (http://doc.gitlab.com/ce/ci/yaml/README.html#cache). My gitlab version is 8.2.1 and my Runner is:

$ docker e         


        
4条回答
  •  孤城傲影
    2020-12-14 16:57

    https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/327

    image: java:openjdk-8-jdk
    
    before_script:
        - export GRADLE_USER_HOME=`pwd`/.gradle
    
    cache:
      paths:
        - .gradle/wrapper
        - .gradle/caches
    
    build:
      stage: build
      script:
         - ./gradlew assemble
    
    test:
      stage: test
      script:
         - ./gradlew check
    

提交回复
热议问题