I want to build scala applications so i use sbt
By default sbt uses ~/.ivy2 ~/.sbt directories to cache library dependencies
image (hseeberger/scala-sbt) defines root as default user when running, so i decided just to move workspace to home directory of root
So i made this pipeline:
workspace:
base: /
path: /root
pipeline:
restore-cache:
image: drillster/drone-volume-cache
restore: true
mount:
- .sbt
- .ivy2
volumes:
- /tmp/cache:/cache
backend:
image: hseeberger/scala-sbt
commands:
- sbt compile test
restore-cache:
image: drillster/drone-volume-cache
rebuild: true
mount:
- .sbt
- .ivy2
volumes:
- /tmp/cache:/cache
But it fails when plugin tries to rebuild cache:
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.14.3/jline-2.14.3.jar ...
[info] [SUCCESSFUL ] jline#jline;2.14.3!jline.jar (346ms)
[info] Done updating.
[info] Compiling 3 Scala sources to /root/target/scala-2.12/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.12.2. Compiling...
[info] Compilation completed in 18.186 s
[success] Total time: 35 s, completed Oct 8, 2017 9:05:20 PM
[success] Total time: 0 s, completed Oct 8, 2017 9:05:21 PM
Rebuilding cache for folder .sbt...
rsync: stat "/cache/.sbt/boot/scala-2.10.6/org.scala-sbt/sbt/0.13.16/.compile-0.13.16.jar.Emopng" failed: Bad file descriptor (9)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
2017/10/09 00:05:25 drone_step_2 : exit code 23
What i did wrong? May be there is a better way, but i think that pipeline should work