Drillster / drone-volume-cache

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

changed cache key to be based on repo branch #20

Closed 3p3r closed 6 years ago

3p3r commented 6 years ago

This PR makes the cache's root directory (key) to be branch based rather than job number based.

Not sure why this was originally job number based. Having a cache key based on job numbers does not make any sense (cache invalidates across jobs?).

I have two deployments of Drone and both of them return "1" for $DRONE_JOB_NUMBER all the time, resulting the cache to be located under /cache/<owner>/<repo>/1 regardless.

3p3r commented 6 years ago

I just noticed #12 , I will make this configurable.