| Timo Sand Yeah, JobDSL always has the configure block option. I agree it is ugly but in the short term it give you a work around (you could wrap that in method call and put it in a library to make it look cleaner). This sounds like something that would be better to fix/enhance in the JobDSL plugin. Maybe it could detect this from context? In the DSL, {sshCheckoutTrait} is a descendant of {github} , the package for which is {org.jenkinsci.plugins.github_branch_source} . If there a trait in the same package, it would seem reasonable to choose it instead of failing. Then all the branch source plugins would be fixed in one shot. Of course, I don't know enough about the JobDSL plugin to know if that would be difficult. |