更改Allure Jenkins配置的默认诱因 - 报告路径

发布于 2025-01-30 19:35:50 字数 608 浏览 5 评论 0原文

在Jenkins配置中,报告路径的默认值是诱人的报告。 有没有办法更改此默认值?

我想将其更改为job_name参数。 我尝试了以下选项,但它不起作用。在生成魅力报告时,命令不使用JOB_NAME参数。

  • $ {job_name}/allure-report
  • “ $ job_name”/ynure-report
  • $ job_name/ynure-report

我更改默认值的理由:我使用custic_workspace用于一些Jenkins作业,在测试服务器上进行空间管理。我想将诱人的报告和诱人的重点分开。

In the jenkins configuration the default value for Report path is allure-report.
Is there a way to change this default value?
Allure default path

I want to change it to take the JOB_NAME parameter.
I tried the following options and it doesn't work. While generating the allure report the command does not take the JOB_NAME parameter.

  • ${JOB_NAME}/allure-report
  • "$JOB_NAME"/allure-report
  • $JOB_NAME/allure-report

allure report generation command

My reason for changing the default value: I use a custom_workspace for some of the jenkins jobs, to do space management on the test server. I would like to keep the allure-report and allure-results separate for each job.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

-小熊_ 2025-02-06 19:35:50

如果您使用的是Groovy脚本,则可以提供自定义目录,以使其魅力提供结果,如下所示:

post {
script {
                allure([
                        includeProperties: false,
                        jdk: '',
                        properties: [],
                        reportBuildPolicy: 'ALWAYS',
                        results: [[path: '${WORKSPACE}/test-reports/report-1']]
                ])
            }
    }

If you are using Groovy script, then you can provide your custom directories for the allure to serve the results as shown below:

post {
script {
                allure([
                        includeProperties: false,
                        jdk: '',
                        properties: [],
                        reportBuildPolicy: 'ALWAYS',
                        results: [[path: '${WORKSPACE}/test-reports/report-1']]
                ])
            }
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文