langers2k/job-dsl-plugin — pull request #1 by awreece (2014-08-11 18:29:14+00:00)
Title: add support for nodeParam

I attempted to create a pull request for this against the main jenkins (https://github.com/jenkinsci/job-dsl-plugin/pull/254), but Dan Spilker suggested I submit the pull request to you. This diff applies cleanly to your branch, but you might want to take the diff in the pull request (I did nothing more than take your branch + my commit, then rebase the whole wad against master).

## Implementation details

The only interesting implementation detail here is that there were several properties in the xml that were solely a function of one input parameter, the trigger.

```xml
multiSelectionDisallowed
false
false
false
```

Using the GUI, I generated xml configs for each possible setting of `triggerIfResult` and hard coded this logic into a `switch`/`case` statement.

## Testing done

In addition to tests included in the diff, I monkey patched the function into `BuildParametersContext.metaClass.nodeParam`, generating a job with the new function. I verified that the configuration of the job looked right in the GUI and verified that I could select which node the build got run on (I verified that the plugin continued to work as expected).