jenkinsci / allure-plugin

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

Allure plugin not showing report - Jenkinsfile Pipeline #269

Closed sachindast closed 1 year ago

sachindast commented 4 years ago

Hello Team,

Reporting the issue on Auget 2020

Issue still seeing in Jenkins - log says Allure report was successfully generated but empty report coming, same is working with normal Jenkins job that uses post-build section to perform allure reports.

Jenkins version : 2.209 allure plugin version : 2.28.1

below is a snippet of the problem

Report successfully generated to /home/allure_pipeline/allure-report Allure report was successfully generated. Creating artifact for the build. Artifact was added to the build.

i'm using within post build section as below :

always { node('build-machine') { sh 'mkdir -p $WORKSPACE/{allure-report,reports}' allure includeProperties: false, jdk: '', results: [[path: 'reports/']] } }

even I have tried by putting it as a stage.

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

I have tried most of the possible ways, let me know if there are any problems the way I'm doing?

Thanks in advance, Sachin Das jenkins_allure_report

4n70w4 commented 3 years ago

The same issue. May be similar https://github.com/allure-framework/allure2/issues/1133

Vodrech commented 3 years ago

When I created the allure report through jenkins pipeline it seemed to work correctly, but then I looked into the GUI configurations and the path were set to "allure-results" instead of the given parameter path "target/allure-results". It seems that it doesn't take in the parameters.

1.) Must I specify the other params, or can't I just specify one? 2.) And is there something with the publisher that is causing the problem?

Note: I tried with all the sugest parameters but it still didn't work.

reference for publisher allure: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html

 publishers {
            allure {
                results([path:'target/allure-results'])
                }
            }

Guidance: If someone gets NaN% in the report on jenkins, look into the results --> path and make sure its pointing to target/allure-reports and not just allure-reports.

Note: This is just for the "General configurations, if you have set to another path/location maybe something else is causing it".

If someone got any advice, its recommended to write those below! Still in search after a solution to auto generate the correct path for allure :(.