I am trying to add the cucumberTestResults as a post-build action to my dsl file. But it is just getting ignored.
job('example-atm') {
scm {
git {
branch(branchName)
remote {
url(gitUrl)
credentials(credentialsName)
}
}
}
triggers {
scm('H/15 * * * *')
}
steps {
maven('clean test')
}
publishers {
cucumberTestResults {
jsonReportFiles('./reports/test-report.json')
ignoreBadSteps()
}
}
}
I found the solution:
publishers {
cucumber {
fileIncludePattern('**/*.json')
}
}
It seems that only https://github.com/jenkinsci/job-dsl-plugin/wiki is the correct wiki. Other pages contained wrong information.