Drone Caching Options - Help to create a list

I am currently researching different caching options/ideas for drone and saw that the topic is discussed also quite often in gitter.

So I thought this would be a good place to share and discuss various caching options for drone.

I can see here different use-cases that might require caching:

  • caching of dependencies/packages required for builds (i.e. python packages / composer packages / node packages).
  • caching/saving of build artifacts

Officials plugins I have found so far:

And drone-cache which receives a very promising rewrite by the community.

Some other ideas that came to my mind - since currently all drone agents are running on the same vm:

  • mounting a local folder (would require special permission? concurrency issues?)
  • mounting a nfs/samba share ?
  • using data-volumes

What do you personally use?
What is your experience so far with it?
Do you have any other ideas as the mentioned?

I will update the post, once I was able to gather some more information - and will try to share my experience

Hello Patrick,

We use caching for .git and go/node dependencies. I wish there was a standard plugin which allows local caching thru docker volume mounting as SFTP option adds to deployment complexity.

Regards,
Zibi

I’ve created a volume based caching plugin for Drone 0.5, drone-volume-cache.
Below the surface it uses rsync to restore and rebuild the cache, making these processes quite speedy.

I’ve been using it at our company to cache Maven artifacts, Node.js dependencies, Bower dependencies, and Docker image layers, and I’m very satisfied with its performance.

The obvious downside of this approach is that you’re required to enable the Trusted flag for the repository, since the plugin uses a mounted volume. It’s probably a bad idea to enable this flag for a public repository.

I submitted a PR to add it to the official list of plugins.

– EDIT –
Volume-cache is now in the list of Drone Plugins: http://plugins.drone.io/drillster/drone-volume-cache/

1 Like