Drillster / drone-volume-cache

Drone plugin for caching to a locally mounted volume
MIT License
109 stars 42 forks source link

Option to isolute cache between matrix builds #3

Closed jhasse closed 7 years ago

jhasse commented 7 years ago

For some cases it would be useful to isolate the cache between matrix builds. This is currently possible via when:, but one has to repeat a lot, especially when the matrix is big.

mjwwit commented 7 years ago

Since the separate matrix build cache adds an extra nested folder, please clear your cache beforehand. You can now also do this by adding [CLEAR CACHE] in your commit message.

jhasse commented 7 years ago

You can now also do this by adding [CLEAR CACHE] in your commit message.

Wohhoo awesome! Thanks :)

jhasse commented 7 years ago

Is the cache now isolated by default? Because most of the time (e. g. caching .git/), I don't want that.

mjwwit commented 7 years ago

Yes, the cache is now isolated by default (per matrix job). Caching common stuff (like .git/) will still work, the only thing is that .git/ is cached per job separately.

jhasse commented 7 years ago

Okay I can live with that. But for very large caches and huge matrices, some people might miss the old behavior.

mjwwit commented 7 years ago

I agree, and I've thought about making it configurable. I'm struggling to figure out a way to cleanly specify which caches to share, and which not to share though. I'm open to ideas about this.

Either way, we'll figure it out soon and implement it.