Allure report generated from Jenkins job returns 404

Viewed 393

I'm trying to use the allure report plugin with Jenkins on CentOS7 for a Java maven project that is using TestNg and Allure test adaptor. The tests run fine and allure-results are generated as expected. My build step in the Jenkins file is

post {
    always {
        script {
            allure([
                commandline: 'allure',
                includeProperties: false,
                jdk: '',
                properties: [],
                reportBuildPolicy: 'ALWAYS',
                results: [[path: target/allure-results]]
            ])
        }
    }
}

I can see the little allure icon in front of the build and when I click on it I get routed to http://xxx.xx.x.xx/index.html#404 with the following information:

URI: /index.html
STATUS: 404
MESSAGE: Not Found
SERVLET: Stapler

In the Jenkins build logs I see the following:

$ /bin/allure generate "/home/path/to/job/target/allure-results" -c -o "/home/path/to/job/allure-report"
WARN: No current version specified. Use `allure switch <version>` to select version of the report.
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: SUCCESS

When I manually try generating the allure report using allure serve, I can view the HTML report in the browser. But it's returning 404 in the Jenkins job.

0 Answers
Related