jenkinsci / allure-plugin

Allure Jenkins Plugin
https://plugins.jenkins.io/allure-jenkins-plugin/
Other
84 stars 62 forks source link

Multiple duplicate Allure reports from parallel Jenkins r #358

Open MagdelineNg opened 3 months ago

MagdelineNg commented 3 months ago

Jenkins and plugins versions report

Environment Jenkins: 2.426.3.3 OS: Linux - 3.10.0-1160.108.1.el7.x86_64 Java: 11.0.22 - Red Hat, Inc. (OpenJDK 64-Bit Server VM) allure-jenkins-plugin:2.30.3

What Operating System are you using (both controller, and any agents involved in the problem)?

Running on Jenkins MacOS ECS nodes

Reproduction steps

I am running a Jenkins pipeline job, where I run the same stages on multiple nodes in parallel, and each parallel run generates an Allure report specific to the node it ran on.

        stage(operatingSystem + ": Generate Allure report on ${env.NODE_NAME}") {
            def allureResultsDirectory = "allure-results"
            def allureReportDirectory = "${env.NODE_NAME}/allure-report"
            def allureReportZip = "allure-report.zip"

            allure includeProperties: false, jdk: '', reportBuildPolicy: 'ALWAYS', 
                results: [[path: allureResultsDirectory]], report: allureReportDirectory

            // Zip the Allure report
            sh "zip -r ${allureReportZip} ${allureReportDirectory}"

            // Archive the zipped Allure report
            archiveArtifacts artifacts: "${allureReportZip}"

            echo "Allure report is generated at: ${env.NODE_NAME}/allure-report"
        }
image

Currently, each new Allure report generated overwrites the previous allure reports displayed on the "Allure Report" Jenkins sidebar panel. I know I can access each individual Allure report through the build artifact I generated or in the allureReportDirectory, but it does not make sense to show 4 same "Allure report" in the sidebar. Is there a way to prevent display each unique Allure report in Jenkins sidebar, or turn off the sidebar "Allure Report" ?

Expected Results

-

Actual Results

-

Anything else?

No response

Are you interested in contributing a fix?

No response