Improve help function and add option to specify a volume#130
Open
jovo3 wants to merge 3 commits intojenkinsci:masterfrom
Open
Improve help function and add option to specify a volume#130jovo3 wants to merge 3 commits intojenkinsci:masterfrom
jovo3 wants to merge 3 commits intojenkinsci:masterfrom
Conversation
There was no help function in jenkins for 'cache dirs' and I had to look into the code to understand how it worked. The docker volume driver to where the documentation refers does not seem to be maintained anymore. Using the local docker volume driver is a valid alternative for a wide range of use cases .e.g. caching repositories
Local is available out of the box without extra installation on the docker swarm nodes. So it makes sense to have this as default.
While cacheDirs is more focused on a unique cache per job, the volumeDirs provides a cache which is usable across multiple jobs. Giving us the opportunity to save disk space. This is different from CacheDirs as we are able to specify the volume name, hence it is reusable between jobs and even between docker images.
mbSmaga
added a commit
to mbSmaga/docker-swarm-plugin
that referenced
this pull request
Apr 3, 2026
Cherry-picked from jenkinsci#130. Adds volumeDir field to agent template for specifying plain Docker volumes, improves cacheDir help, sets default cache driver to local.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved help function for cache dir and docker volume driver + adding a field to create a plain docker volume
See commit messages for more info.
Testing done
These 3 commits are already active through a self built docker swarm plugin on our own Jenkins and running for several months.