Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Can't cache gradle dependencies with message "no such file or directory" #235

@KangbingZhao

Description

@KangbingZhao

Describe the bug
can't cache gradle dependencies.

I mount host directory /tmp/cache/gradle as cache.

I checked that it's exact gradle depedencies directory.
image

but rebuilding cache failed
image

To Reproduce
Steps to reproduce the behavior:

kind: pipeline
type: docker
name: test
steps:
  - name: restore-cache-with-filesystem
    image: meltwater/drone-cache
    pull: if-not-exists
    settings:
      backend: "filesystem"
      restore: true
      cache_key: "volume"
      archive_format: "gzip"
      mount:
        - "/root/.gradle/caches"
    volumes:
      - name: cache
        path: /tmp/cache/gradle
  - name: pre
    image: openjdk:17-jdk-slim
    volumes:
      - name: sock
        path: /var/run/docker.sock
    commands:
      - ./gradlew build -profile -i
      - cd /root/.gradle
      - ls -a
  - name: rebuild-cache-with-filesystem
    image: meltwater/drone-cache
    pull: if-not-exists
    settings:
      backend: "filesystem"
      rebuild: true
      cache_key: "volume"
      archive_format: "gzip"
      # filesystem_cache_root: "/tmp/cache"
      mount:
        - "/root/.gradle/caches"
    volumes:
      - name: cache
        path: /tmp/cache/gradle
volumes:
  - name: sock
    host:
      path: /var/run/docker.sock
  - name: cache
    host:
      path: /tmp/cache/gradle

Specifications

  • Version: drone 2.15.0
  • Platform: Linux
  • Subsystem: Ubuntu 20.04 in WSL2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions