jenkinsci/job-dsl-plugin — pull request #41 by daspilker (2013-03-12 21:00:42+00:00)
Title: Groovy Build Steps

Here come the Groovy build steps. I tried to keep the syntax close to the Ant steps since both steps have similar properties. 'groovyParam(s)' and 'scriptParam(s)' define parameters for the Groovy executable and the script. 'prop(s)' is an shortcut to define -D parameters. I hope the methods are self-explanatory. I did some refactoring so that the Groovy and System Groovy steps share an AbstractGroovyContext and I moved to construction of the scriptSource element to a separate method.

```groovy
steps {
groovyCommand(String commandString, String groovyInstallation = '(Default)', Closure groovyClosure = null) {
groovyParam(String param)
groovyParams(Iterable params)
scriptParam(String param)
scriptParams(Iterable params)
prop(String key, String value)
props(Map map)
javaOpt(String opt)
javaOpts(Iterable opts)
groovyInstallation(String groovyInstallationName)
classpath(classpathEntry)
}
groovyScriptFile(String fileName, String groovyInstallation = '(Default)', Closure groovyClosure = null) {
groovyParam(String param)
groovyParams(Iterable params)
scriptParam(String param)
scriptParams(Iterable params)
prop(String key, String value)
props(Map map)
javaOpt(String opt)
javaOpts(Iterable opts)
groovyInstallation(String groovyInstallationName)
classpath(classpathEntry)
}
}
```

I will adjust the wiki if you merge this.