Allow caching artifacts without privileged containers and volumes #2296
Replies: 3 comments 1 reply
-
Caching is a highly requested feature and we talked a lot about it already. I would prefer to have some official plugins which help the user to do caching. How the caching works really depends on the "backend" you want to use IMO. Most users will probably be fine with simply putting caches in a folder on the server, but as you can have multiple agents for your Woodpecker instance or could even use Kubernetes (#9) as backend, most larger deployments probably need some kind of clustered caching backend like s3 as well. Woodpecker should probably be the generic base for it and the caching plugins could do the magic in the background. If we have some nice plugins we should add a sample about them somewhere in the docs as well (#316). |
Beta Was this translation helpful? Give feedback.
-
Although putting cache into S3 is a choice but it is still slow and wastes bandwidth. In some cases, we have predictable hosts to run agents. So on every host, we can cache the files separately. I do not care about if the cache is sync-ed. If there is cache, then I'd like to reuse it; if there is no cache, then I can let the job to init a new cache, instead of restoring it from somewhere else. ps: now I am using such local cache mechanism, and I use Docker-in-Docker to isolate the agents from hosts, then I can set |
Beta Was this translation helpful? Give feedback.
-
"Allow agent to cache" would be the feature then I guess? |
Beta Was this translation helpful? Give feedback.
-
Clear and concise description of the problem
Allow for the pipeline to cache artifacts, much like what Travis CI allows you to do: https://docs.travis-ci.com/user/caching/
This is currently possible in Woodpecker, but only if using volumes. It would be pretty neat if volumes weren't required and Woodpecker could cache items without exposing security issues.
Suggested solution
When the pipeline completes, save the indicated directories somewhere. Then, on subsequent runs of the pipeline, mount that directory automatically. Perhaps automatic volume creation?
Alternative
The current method is insecure and should not be available to untrusted users.
Additional context
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions