I’m upgrading from drone 0.4 to 0.5 and I’m pretty sure the /root directory is being erased from the underlying docker image, or the wrong docker image is being used.
The docker image has loads of files in /root/.sbt and /root/.ivy2 but these directories don’t exist.
I updated the docker image to move the ivy2 and sbt directories to /drone, but that /drone doesn’t exist either. So I’m now thinking that my image is just being ignored or there is some weird chroot rule being used by drone.
Drone does not tamper with the root directory. Drone pretty much executes docker run to instruct the Docker deamon to create and run your build. So if you think something is tampering with your root directory, I would ask the Docker folks.
This is because drone mounts /drone as a shared volume across all containers in your build pipeline, which will override any existing /drone directories in your images. The /drone directory is reserved for use by drone only.
shared volume? But isn’t that going to cause huge problems if two builds are accessing the same directory at the same time? And what about leftovers? I really want a clean folder for each checkout, are you saying it might contain binaries from a previous build?
shared volume? But isn’t that going to cause huge problems if two builds are accessing the same directory at the same time? And what about leftovers? I really want a clean folder for each checkout, are you saying it might contain binaries from a previous build?
The volume is shared by all steps (ie containers) in your pipeline, for the duration of a single build. When the build completes the volume is removed. This is the same behavior we had in 0.4.
I should mention that 0.4 and 0.5 share the same build runner. While there are changes one level above the build runner (yaml and secrets) the build runner itself and low level docker interactions have not changed in 0.5