jenkinsci/job-dsl-plugin — pull request #143 by JeremyMarshall (2014-02-03 03:58:40+00:00)
Title: Matrix Job support

I put together matrix job support which works like the Multijob support where you pass in a type

```
job (type: Matrixjob){
//any sections from freestyle

matrixAxis(String , String axisName, StringArray axisValues)
matrixSequential(Boolean runInSequence = false )
matrixCombinationFilter(String filter)
matrixTouchstoneFilter(String filter, Boolean continueOnStable = true)
}
```
such as

```
job (type: Matrixjob){
name "test_matrix"

matrixAxis('Text', 'aaa', ['1','2','3'])
matrixAxis('Label', 'bbb', ['master'])
matrixAxis('LabelExp', 'ccc', ['master'])

steps {
shell('env|sort')
}

configure { project ->
def ax = project/'axes'
ax << {
'hudson.matrix.TextAxis' {
delegate.createNode('name', 'ddd')
values {
string 'z'
string 'y'
string 'x'
}
}
}
}
}
```
which works with the three standard matrix types, others can be built with a config block
There is also support for filtering matrix combinations and keystone builds.

The only caveat I can see is that regenerating freestyle jobs into matrix job doesn't work. Possibly this is a good use case so I'll investigate