jenkinsci / docker-swarm-plugin

Jenkins plugin which allows to add a Docker Swarm as a cloud agent provider
https://plugins.jenkins.io/docker-swarm/
MIT License
55 stars 48 forks source link

Need To Have Agent Use Specific --network option #82

Open David-Villeneuve opened 4 years ago

David-Villeneuve commented 4 years ago

Is there a way to have an agent use a specific --network option?

Currently using the regular docker plug-in, where there is an option for this, but no discernible way to specify this with docker-swarm.

gutschet commented 4 years ago

Isn't it this option, you are looking for? grafik

David-Villeneuve commented 4 years ago

I'm sorry, I was not clear in my question. The option shown is for the whole swarm cloud defined, not the individual agent templates. Not every template we have using the non-swarm plug-in that we would want to move to swarm is using the same Docker network. I guess it is more a question of granularity.

gutschet commented 4 years ago

@David-Villeneuve : can't you just add a second swarm cloud in jenkins config? Sorry, I never tried that before.

JcKlomp commented 3 years ago

This would be quite a useful feature. Defining a second swarm cloud unfortunately doesn't work: https://github.com/jenkinsci/docker-swarm-plugin/issues/90