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([...])
}
}
Came here for the same question. Figured it out from the docs. https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md
In summary, the
recordIssues
command is intended to be used alone for simple usecases while thescanForIssues
andpublishIssues
commands are intended to be used together for more complex usecases.So your usage of
recordIssues
seems perfectly in line with the authors intent.From the documentation: