Skip to content

Improve help function and add option to specify a volume#130

Open
jovo3 wants to merge 3 commits intojenkinsci:masterfrom
jovo3:master
Open

Improve help function and add option to specify a volume#130
jovo3 wants to merge 3 commits intojenkinsci:masterfrom
jovo3:master

Conversation

@jovo3
Copy link
Copy Markdown

@jovo3 jovo3 commented Jul 10, 2024

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.

jovo3 added 3 commits July 10, 2024 14:55
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant