你能用Jenkins Pipeline解析TAP格式吗? [英] Can you parse TAP format using Jenkins Pipeline?

查看:182
本文介绍了你能用Jenkins Pipeline解析TAP格式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解析BATS脚本的输出( https:// github.com/gaia-adm/docker-bench-test ),其输出为TAP格式。我已经稍微修改了脚本以涵盖CIS 1.13而不是1.11,但我不知道如何让Jenkins Pipeline处理该输出。

I'm trying to parse the output from a BATS script (https://github.com/gaia-adm/docker-bench-test) which outputs into TAP format. I've modified the scripts slightly to cover CIS 1.13 instead of 1.11, but I don't know how to make Jenkins Pipeline handle that output.

我知道有一个Jenkins插件为TAP格式,但我不相信这适用于Jenkins Pipeline Groovy脚本。

I know there is a Jenkins plugin for TAP format, but I don't believe this works with Jenkins Pipeline Groovy scripts.

推荐答案

安装了tap插件后,我可以通过以下命令使用声明式管道脚本来显示tap文件的测试结果:

With the tap plugin installed I was able to get my declarative pipeline script to display test results from tap files with the following command:

stage('publish test results') {
    steps {
        step([$class: "TapPublisher", testResults: "**/reports/*.tap"])
    }
}

我如何使用发布TAP结果 Jenkins 2.0 Pipeline插件?

这篇关于你能用Jenkins Pipeline解析TAP格式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆