gpt4 book ai didi

jenkins - 如何在 jenkins 管道中运行 allure 插件?

转载 作者:行者123 更新时间:2023-12-02 16:48:16 25 4
gpt4 key购买 nike

我正在为多个项目构建基于 pipeline/jenkins 的 CI,并希望存储 allure 结果,就像在使用快速访问图标的常规构建中完成的那样。是否可以通过管道实现?

最佳答案

我们未能在管道中使用 Allure Jenkins 插件。似乎它仅支持 job-dsl-plugin 。所以...只需添加使用 Allure CLI 生成报告的阶段并将报告发布为常规 HTML 报告即可。它的图标将在作业和构建屏幕上可用。

更新

Allure v2 已支持管道 - 请参阅 documentation .

stage('reports') {
steps {
script {
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'target/allure-results']]
])
}
}
}

关于jenkins - 如何在 jenkins 管道中运行 allure 插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40379494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com