init.groovy scripts is a very powerful way to setup jenkins but require to know jenkins / plugins programmatic API. If you're not a plugin developer this might be very uncomfortable to write and maintain.
As an alternative, you might be interested in https://github.com/jenkinsci/configuration-as-code-plugin 2018-04-23 11:02 GMT+02:00 Alex Els <a.leonha...@elsevier.com>: > Hi there, > > I'm trying to create a automated setup of Jenkins masters and am > struggling with setting up custom plugins, like terraform or docker, > programatically via groovy scripts in > init.groovy.d > > are there any good resources on how to do this? > > I'm using the Jenkins docker image, which can automatically install all > the desired plugins, but it's a mystery on how to use groovy init scripts > to configure any custom installed plugin/extension. I've found resources > that configure things like maven etc., but nothing that would help me set > up a "installation" of `terraform` and such .. > > How do people on here go about this in general? Just do the clicky thing > and the put the XML files into Git (minus the passwords, if any, of > course)? I'd really rather not do that, and use the groovy init scripts > instead, if at all possible for these cases? > > Thanks > Alex > > -- > 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-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/21149959-9810-47d6-b77e-58bec2c053e2%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/21149959-9810-47d6-b77e-58bec2c053e2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmPBL7xN9_pAX5qTDryecUiypHjDbNVCwqh9KwBsdm%3DVw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.