相关疑难解决方法(0)

gitlab ci缓存没有匹配的文件

我尝试使用gitlabRunner构建APK

当我构建apk时,我不想每次都下载所有构建文件

所以我尝试缓存.gradle / caches和.gradle / wrappers

以下是我的gitlab-ci.yml

sdk_build_job
  image: myimage:latest
  stage: sdk-build
  script:
    ...
  cache:
    key: gradle-cache
      - /root/.gradle/caches
      - /root/.gradle/wrapper
Run Code Online (Sandbox Code Playgroud)

但是创建gradle-cache总是发出警告

Creating cache gradle-cache...
WARNING: /root/.gradle/caches: no matching files       
WARNING: /root/.gradle/wrapper: no matching files      
Archive is up to date!                             
Run Code Online (Sandbox Code Playgroud)

我不知道为什么找不到缓存和包装器目录

当我进入Docker容器并找到文件夹时,位置很好

root@runner-3d9fa57b-project-4-concurrent-0:~/.gradle# pwd
/root/.gradle
root@runner-3d9fa57b-project-4-concurrent-0:~/.gradle# ls -al
total 28
drwxr-xr-x 7 root root 4096 Dec 28 02:21 .
drwx------ 1 root root 4096 Dec 28 02:19 ..
drwxr-xr-x 6 root root 4096 Dec 28 02:20 caches
drwxr-xr-x 3 …
Run Code Online (Sandbox Code Playgroud)

gitlab-ci gitlab-ci-runner

9
推荐指数
2
解决办法
2258
查看次数

标签 统计

gitlab-ci ×1

gitlab-ci-runner ×1