Chris,

Thank you for your reply.  Yes, I am using the copy config.xml approach for 
a lot of scenarios but it seems like a back door approach.  I would have 
more confidence in the robustness of my code if I were using an API that 
threw errors when I did things wrong rather than potentially write some bad 
xml that either breaks jenkins all together (i've had it refuse to start a 
few times) or misbehave is subtle ways.

All that said though, to answer your question about specific examples, here 
are two of my other posts on things I am trying to configure in Jenkins via 
groovy.  

How to configure Maven Installation via Groovy 
<https://groups.google.com/forum/#!topic/jenkinsci-users/wsvDiFVQ7xo>
Create UserPrivateKeySource Credential via Groovy? 
<https://groups.google.com/forum/#!topic/jenkinsci-users/Ou3k6Mqr3vg>

In the case of the former, I am presently using an xml template as the 
solution.  In the latter case, I have not go there yet as there does seem 
to be hope of getting the API to work. (fingers crossed).

--Ken

On Monday, January 12, 2015 at 7:46:06 AM UTC-5, Kenneth Baltrinic wrote:
>
> I am working on creating a chef cookbook to automate our Jenkins 
> infrastructure.  I am using the opscode Jenkins cookbook as my starting 
> point but it only has a few basic resources.  I can see I am going to need 
> use the cookbook's jenkins_script resource to configure Jenkins via groovy. 
>
> That would be fine except I am having considerable difficulty figuring out 
> how to configure Jenkins via groovy.  There does not seem to be a lot of 
> information out there either in the Jenkins docs nor in blogs, etc.  None 
> of the plug-ins document their API, etc.  There are API docs for main 
> Jenkins which help but only if you already understand the big picture, 
> which is what I am struggling with right now.  I understand how to 
> configure all of our Jenkins boxes via the UI, but how do I learn to 
> translate that into knowledge of writing groovy scripts?  Right now the 
> only means I am seeing is to spend a very long time digging my way through 
> the source code itself and learning from trial and error.  Is there another 
> way? 
>
> How do people out there learn and use the Jenkins API?
>

-- 
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/ed568564-34be-41d4-8a2d-63672dfdc84d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to