如何使用管道插件在 jenkins 中发布 findbugs 报告?

How to publish findbugs report in jenkins using pipeline plugin?

我有 gradle 项目,我添加了 findbugs 步骤。 XML 生成了带有报告的文件,但我不知道如何使用管道插件在 jenkins 中显示结果。

我安装了 findbugs 插件,但找不到如何在管道脚本中使用它的说明。

如何在管道中使用 findbugs 插件或文档如何在管道中使用 findbugs?

基于官方 FindBugs Plugin 页面,最新版本添加了对管道作业的支持:

Release 4.62

Added support for workflow plug-in (Thanks to Antonio Muñiz and Manuel Recena for their PRs)
Fixed links in detail page of trend reports (JENKINS-29900)

您应该能够在 Snippet Generator 中找到 FindBugs step,即:

step([$class: 'FindBugsPublisher ', ... ])