Expose a new plugin via job DSL

39 views
Skip to first unread message

GCA

unread,
Jan 26, 2016, 5:42:17 PM1/26/16
to job-dsl-plugin
Hi DSL users,

We have a jenkins plugin developed and been in use for few months now. The plugin introduces a new job type. 

I have looked around to include our new job type in DSL and found https://github.com/jenkinsci/job-dsl-plugin/wiki/Extending-the-DSL 

Would this work for a new job type  ?  Has anyone tried this before ?

Thanks in advance. 



Victor Martinez

unread,
Jan 27, 2016, 3:23:37 AM1/27/16
to job-dsl-plugin
Hi GCA,

 It should work, afaik the Ansible plugin used that extension feature sometime ago, see the below commit 


I hope it helps

Cheers

Daniel Spilker

unread,
Jan 27, 2016, 3:32:23 PM1/27/16
to job-dsl...@googlegroups.com
Currently it's not possible to add a new job type through an extension point. There is already a JIRA issue for this: https://issues.jenkins-ci.org/browse/JENKINS-31912

But you can use a configure block to change the root element to match the new job type. There is an example in the wiki: https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block#configure-matrix-job

Daniel

--
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/cd2b21d2-f25f-4b22-9c1b-89975717eee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

GCA

unread,
Jan 28, 2016, 3:32:56 PM1/28/16
to job-dsl-plugin
Thanks Daniel and Victor, I will try with configure block. 
Reply all
Reply to author
Forward
0 new messages