I am trying to build a chef recipe to deploy/manage our Jenkins instances. 
 Things are going reasonably well but the ops-code Jenkin cookbook only 
provides some basic configuration recipes. It does give you a resource by 
which to run groovy scripts though and with that and the help of a few 
blogs I have gotten some basic stuff set up.  However, now now I am trying 
to do something quite simple in the UI but am stumped about how to do this 
with a groovy script: Set up a Maven installation that installs a specific 
version automatically.

Here is what I think I have figured out so far:


*import jenkins.model.**

*def inst = Jenkins.getInstance()*
*def desc = inst.getDescriptor('hudson.tasks.Maven')*
*def installs = desc.getInstallations()*

installs in this case seems to have the list of existing installs, but I 
cannot figure out how to programatically add an install to it, for instance 
I would like to add an installation that is named 'mvn-3-0-5' that 
automatically installs maven v 3.0.5.

Any idea on how I can do this?  Any help will be much appreciated.  Thanks.

--Ken

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/563f2849-f165-434d-8f04-83a793c87fcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to