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 47 forks source link

Is there Rest API to change image in Docker agent templates? #123

Open danyang-intel opened 1 year ago

danyang-intel commented 1 year ago

What feature do you want to see added?

Hello team, I'd like to query if there is REST API to change image in Swarm plugin's Docker agent templates? In our use case, there are several docker agent templates and images might be changed frequently, so we'd like to just update the image value by REST API in some automation process. Is it possible? Or any suggestion? dockerSwarm

PS, another question, Is it supported to define docker agent by yaml in pipeline, like what k8s plugin does? We go though the doc but don't see it mentioned. I guess the answer is no, but want to get confirmation. Thank you for the help.

Upstream changes

No response

optica-phoffmann commented 1 year ago

We use Jenkins Configuration as Code (JCAC) to define swarm images in the yaml config file and update the Docker Agent Templates dynamically on demand.

danyang-intel commented 1 year ago

Thank you for the sharing, @optica-phoffmann . https://github.com/jenkinsci/configuration-as-code-plugin, right? We'll have a try.