jenkinsci/job-dsl-plugin — pull request #291 by steve-jansen (2014-09-25 03:56:32+00:00)
Title: JENKINS-21750 DSL support for the promoted-builds plugin (take 2 for #157)

Hi @dickerpulli and @daspilker

This is my humble attempt to help the project ship Thomas' awesome work in #157. I fully understand the motivation to create extension points in the DSL for other plugins in the future. Thomas' work is solid - I've been using a local .hpi build of his PR branch for many weeks now. It's been very reliable.

I think the Jenkins community overall would benefit quite a bit by shipping #157 as-is, and refactor the promoted-builds support in a separate PR for an extension point. The work on the extension point seems to have stalled out (no criticism - it's a heroic effort to do both the promoted builds and abstract that support to something generic at the same time).

In an effort to make help make you life easier as the maintainer of the project (and author of the original PR), I did a few things:
1) rebased from the latest upstream master for v1.25 (this was no fun)
2) squashed Thomas' work down to a single commit (maintaining Thomas as the author of course)
3) added a small fix for parameterizedBuild actions in promotions

I hope you find this useful. The promoted-builds plugin can be a workhorse for continuous delivery in Jenkins, and the job-dsl plugin makes continuous delivery way easier to implement in Jenkins compared to point and click manual job creation in the UI. Having proper support for promotions in the job-dsl is a great step forward.

All the tests pass on my local build, however, the rebase was fairly complicated so I welcome some serious scrutiny on the changes.

Cheers,
Steve