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,