The Jenkins Warnings Next Generation Plugin's documentation for pipelines specifies three step variants:
publishIssues
: Publish issues created by a static analysis scanrecordIssues
: Record compiler warnings and static analysis resultsscanForIssues
: Scan files or the console log for warnings or issues
I've just tried this simple snippet out:
stage('QA checks') {
steps {
recordIssues([
enabledForFailure: true,
tools: [php()]
])
}
}
and got the result displayed on the build's page ("PHP Runtime: No warnings"). But then what is the sense of the other two steps?
What is a proper way of configuring the plugin? Should these three parts be used, like this?
stage('QA checks') {
steps {
scanForIssues([...])
recordIssues([...])
publishIssues([...])
}
}