job-dsl-core Run support for Extensibles (e.g., promoted-builds)

57 views
Skip to first unread message

Dominic Evans

unread,
May 13, 2016, 12:00:59 PM5/13/16
to job-dsl-plugin
Hi,

Previously I was using a build.gradle script like the one below to verify the correctness of .groovy dsl files and to allow me to easily browse the generated Jenkins .xml files (e.g., for comparison with existing manually created jobs)

https://gist.github.com/dnwe/ed5890c75eca030e731b1252ab01c18e

Now that '[JENKINS-29776] Add Job DSL support for Promoted Builds' has been merged and released with the corresponding job-dsl-plugin support, we plan to extend our dsl scripts to cover builds that use that plugin. However, it doesn't currently appear possible to include extension points in the FileJobManagement provided by job-dsl-core and the 'callExtension(...)' method is just stubbed out via MockJobManagement. I did briefly experiment with pulling in the Jenkins plugin jars using org.jenkins-ci.jpi and adding a custom FileJobManagement.groovy to override the default behaviour, but quickly ran into hudson imports that seemed to indicate I'd end up pulling in the whole of Jenkins if I went down that route.

Any pointers/ideas?

Cheers,
Dom

Daniel Spilker

unread,
May 17, 2016, 10:22:52 AM5/17/16
to job-dsl...@googlegroups.com
The next release (1.47) will add support for testing extensions. See https://github.com/jenkinsci/job-dsl-plugin/pull/837 and https://github.com/sheehan/job-dsl-gradle-example/pull/39.

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/6a253397-9250-489b-a367-5db494f9df3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dominic Evans

unread,
May 23, 2016, 7:14:37 AM5/23/16
to job-dsl-plugin
Excellent! Thanks Daniel
Reply all
Reply to author
Forward
0 new messages