-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to re-use the cache ? #86
Comments
I have solved it in a different way.
In this way, all build containers use the NFS server share for their repository and so they share this repository, no matter on what node the build is executed. |
Thanks for your insight, that is indeed a solution I considered and tested (not the NFS fileserver but simple host-binding of the repo) but I would not consider this a cache as good as the one provided with The data inside of the repo would indeed not be wiped after each job, but I still have one issue : |
Hey, I'm trying to use caching too without any luck and i'm guessing : does it actually work ? I'm trying to cache the whole jenkins workspace directory just to give it a shot before narrowing things so i put Then I started a new build and it creates a new directory Maybe I am mistaken ? |
After some testing, I found that caching works across builds, but only with freestyle jobs (classic jobs), not pipeline jobs. Here is a cached file (named Here is a cached file with a pipeline job (exists only while build is running): As @mpnico noticed, I can look into a PR if @Roemer can confirm that this project is still being maintained. Side Note: I think that it would be helpful to provide a way to customize the volume name so that caching is not per-job. For example, in the modern world, I may have 100 jobs for one project via a Multibranch Pipeline (one per branch, PR, etc), and I may be OK with sharing a cache between them (or some subset). |
I use docker in pipeline ,but my docker use is : |
Hi,
I'm trying to use the caching feature which could solve some of the problems I am facing with Jenkins and Maven.
One of my use case is the following :
I want to cache the maven repo between Jenkins jobs to prevent maven from re-downloading all the third party libraries.
Jenkins' maven instances are configured to set the repo at
/home/jenkins/.repository
.I then configure the Jenkins cloud template like this :
Docker Swarm Cloud Configuration
Cache driver name :
rapt/cachedriver
Cache Dirs (newline-separated) :
/home/jenkins/.repository
The plugin has been installed on all nodes, the folder
/cache
exists on all the host nodes.Everything is fine, maven will do its thing and download jars & poms into the
/home/jenkins/.repository
folder and then after the build, the repo gets persisted into/cache/part_of_xxx_»_yyy#zzz
.I've got several questions regarding the reusability of the cache :
Thanks
The text was updated successfully, but these errors were encountered: