jenkinsci/job-dsl-plugin — pull request #40 by daspilker (2013-03-08 20:38:37+00:00)
Title: System Groovy Steps

I added support for system groovy build steps. There are two new methods in the steps context. One for executing an inline script and one for executing a script file. Both methods can be extended by a special context which allows to add variable bindings and classpath extensions for the scripts. The DSL looks like this:

```groovy
steps {
systemGroovyCommand(commandString) {
binding(name, value)
classpath(classpathEntry)
}
systemGroovyScriptFile(fileName) {
binding(name, value)
classpath(classpathEntry)
}
}
```

The binding and classpath method can be called multiple times to add more bindings and classpath entries.

Example:
```groovy
steps {
systemGroovyCommand('println "Hello World!"')
systemGroovyScriptFile('scripts/acme.groovy') {
binding('foo', '123')
binding('bar', 'abc')
classpath('lib/acme.jar')
classpath('lib/acme-plugins.jar')
}
}
```

I will adjust the wiki if you merge this.