-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
jenkins 1.625.3 LTS
job-dsl plugin 1.42
xunit plugin 1.93
The default values for the thresholds are empty strings in the GUI, while in the Job DSL plugin they are zeroes. An empty threshold means it is not enforced, while a 0 one means there should not be any failures of this kind.
Effectively, in the GUI the default is "enforce nothing, any number of errors is fine", while in the default DSL-generated job it's "strictly enforce everything, there should be no errors at all".
While this bug is actually promoting good practices, it is still a bug
Faulty job example:
job('threshold-defaults-bug') { publishers { archiveXUnit { jUnit { pattern('test-results.xml') } } } }
You can run it here: http://job-dsl.herokuapp.com/. Note that all the generated thresholds have 0s, not empty strings.
This issue has been already reported, see https://github.com/jenkinsci/job-dsl-plugin/pull/725