Configure Docker Plugin with groovy

201 views
Skip to first unread message

Ob Zen

unread,
Dec 28, 2015, 3:55:10 PM12/28/15
to Jenkins Users
Hi all,

I'm trying to add DockerCloud via groovy script. I found how create DockerCloud constructor, but I don't understand how to save my configuration. See simple code below.

------
import com.nirima.jenkins.plugins.docker.*

def instance = Jenkins.getInstance()
def desc = instance.getDescriptor(com.nirima.jenkins.plugins.docker.DockerCloud)

def c = new DockerCloud(
  "name1",
  [],
  "127.0.0.1",
  "100",
  0,
  0,
  "",
  ""
)
------

Fron jenkins plugin source code
public DockerCloud(String name, List<? extends DockerTemplate> templates, String serverUrl, int containerCap, int connectTimeout, int readTimeout, String credentialsId, String version)

Maybe anybody knows how to save plugin configuration and how to find and save other plugins configurations.

Baptiste Mathus

unread,
Dec 28, 2015, 4:02:24 PM12/28/15
to jenkins...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0c127f9c-ad43-4c87-ba81-dd2e9f4507d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Ob Zen

unread,
Dec 28, 2015, 4:16:04 PM12/28/15
to Jenkins Users, m...@batmat.net
Thanks. Works well. Question resolved.

вторник, 29 декабря 2015 г., 0:02:24 UTC+3 пользователь Baptiste Mathus написал:
Reply all
Reply to author
Forward
0 new messages