I believe that this was closed incorrectly. It is a duplicate of
JENKINS-28303. From that bug:
"Realised this issue is also mapped to job-dsl-plugin, if you want to upgrade the dsl-plugin to work with never versions on priority-sorter and need some directions just let me know."
That is exactly what I want, sorry if that was not clear. If the recommended way is to support job groups then maybe we should implement that. When I set one of these up in the Jenkins Web interface I get the following added to config.xml:
Are these both required for it to work or can we just add the second one?
Would the following be a reasonable interface in the DSL?
Personally I believe that setting the priority directly on a job would be helpful for job-dsl-plugin users who probably want to manage as much as possible from their DSL code. If it is still available in the web ui and is not deprecated then I don't see a problem with supporting it in job-dsl-plugin.