更改allure jenkins配置的默认allure-report路径

问题描述 投票:0回答:1

在 jenkins 配置中,报告路径的默认值为 allure-report。 有没有办法改变这个默认值?

我想更改它以采用 JOB_NAME 参数。 我尝试了以下选项,但它不起作用。生成魅力报告时,该命令不采用 JOB_NAME 参数。

  • ${JOB_NAME}/allure-report
  • “$JOB_NAME”/allure-report
  • $JOB_NAME/allure-report

我更改默认值的原因:我对某些 jenkins 作业使用 custom_workspace,以在测试服务器上进行空间管理。我想将每项工作的诱惑报告和诱惑结果分开。

jenkins jenkins-plugins allure
1个回答
0
投票

@Ritica, 如果您使用的是 groovy 脚本,那么您可以提供自定义目录以提供如下所示的结果

post {
script {
                allure([
                        includeProperties: false,
                        jdk: '',
                        properties: [],
                        reportBuildPolicy: 'ALWAYS',
                        results: [[path: '${WORKSPACE}/test-reports/report-1']]
                ])
            }
    }
© www.soinside.com 2019 - 2024. All rights reserved.