jenkinsci/docker-swarm-plugin

docker volume driver support with manual source and destination input in agent specs

Opened this issue · 1 comments

The current docker swarm plugin is generating the source volume name by default based on the location of the job. for ex: ("Source": "Madhu_Test_build_test-build_test") for the job "/job/Madhu-Test/job/build_test/"on jenkins server.

The scenario I'm working on requires this to be manually assigned similar to "Volumes" section under container specs in docker plugin.

Right now docker service inspect shows below block for mount section on the agent launched by this plugin when a build is triggered with Cache driver name = netapp and Cache Dirs = self_assigned_docker_volume:/home/jenkins

"Mounts": [
{
"Type": "volume",
"Source": "Madhu_Test_build_test-build_test",
"Target": "self_assigned_docker_volume:/home/jenkins",
"VolumeOptions": {
"DriverConfig": {
"Name": "netapp"
}
}
}
]

I'm looking for an option that should be like below:

"Mounts": [
{
"Type": "volume",
"Source": "self_assigned_docker_volume",
"Target": "/home/jenkins",
"VolumeOptions": {
"DriverConfig": {
"Name": "netapp"
}
}
}
]

Any update on this ?