我不知道有什么插件可以实现此目的,但一些手动解析可能会起作用(如果您使用的是管道)。
def output = sh script: "npm audit", returnStdout: true
def summary = output.split("\n")[-1] //get the summary from the last line
...
Run Code Online (Sandbox Code Playgroud)
然后,您可以使用一些正则表达式或其他字符串操作来查找关键之后的数字。您还可以使用 archiveArtifacts 将整个输出保存在构建历史记录中。
| 归档时间: |
|
| 查看次数: |
2717 次 |
| 最近记录: |