How do I generate a job from configuration fragments?

51 views
Skip to first unread message

Ioannis Moutsatsos

unread,
Nov 21, 2017, 10:04:02 AM11/21/17
to job-dsl-plugin
First, thank you for this powerful and useful plugin!

After playing with the jobDSL plugin for a day now, I have managed to create Jenkins jobs by building from a  'seed' project
I think I have a good understanding on how the plugin works for theses standard cases.

Now I would like to get some expert feedback on how best to approach the following use case.

Being an avid user of the Active Choices plugin I have several combinations of AC-parameters that together create little UI gadgets that provide useful functionality.

Here is an example of a Server File Browser 'gadget' consisting of a combination of 3 active choice parameters. I can certainly code this into a jobDSL script to create a free-style job.

The use case I'm interested in however, is to assemble small groups of Active Choice parameters (coded as dsl scripts) into a new Jenkins project. 
By choosing from a set of managed dsl scripts I want to create a new project from groups of parameters rather than simple parameters themselves.

Is there a way to execute a dsl script so that only generates a fragment of the job configuration rather than the complete job?
Any feedback or ideas on whether something like the idea below is possible with the jobDSL plugin or standalone functionality?






Matt Sheehan

unread,
Nov 27, 2017, 9:50:23 PM11/27/17
to job-dsl...@googlegroups.com
There are some examples here for pulling out reusable DSL pieces: https://github.com/sheehan/job-dsl-gradle-example 

Is that what you're trying to do?

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/23fbe7a7-571a-4c12-8bcd-62955659def8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ioannis Moutsatsos

unread,
Nov 28, 2017, 10:33:24 AM11/28/17
to job-dsl-plugin
Thanks for the link! 

I watched the GR8Conf 2015 video as well as the one from Eric Helgenson (on Chef and Job-DSL)
It seems that Job-DSL-Gradle combination is something I should explore further. 

Still it seems that this is focused on the Jenkins 'DSL-jobs' as reusable components. 
Does the concept extend to any job component (like parameters or combinations there of)  as re-usable DSL scripts? 

Matt Sheehan

unread,
Dec 3, 2017, 8:47:19 AM12/3/17
to job-dsl...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages