I'm trying to prepare script to configure a few jobs using Jenkins Job DSL plugin. It should prepare matrix job with many axes (something around 50) and with configured option "Retry build after failure", but I noticed that it doesn't support all available options.
In job configuration (manually) we can set:
and Jenkins Job DSL has:
Currently my script looks like that:
publishers {
retryBuild {
rerunIfUnstable()
retryLimit(2)
fixedDelay(0)
}
}
Unfortunately I can't configure option: "Rerun build only for failed parts on the matrix"... It's necessary, because I don't want to rerun all parts, just because one fails.
Is it possible to do it somehow? It doesn't have to be done by Job DSL plugin (but of course not manually).
A characteristic of this project sometimes causes that some parts fail, that's why rerunning is necessary.
The built-in DSL does not support all options. But the Dynamic DSL does:
matrixJob('example') {
publishers {
naginatorPublisher {
regexpForRerun(null)
rerunIfUnstable(true)
rerunMatrixPart(true)
checkRegexp(false)
maxSchedule(2)
delay {
fixedDelay {
delay(0)
}
}
}
}
}