allure-plugin
allure-plugin copied to clipboard
Unable to set different target directory
Issue
Context
-
Jenkins version: 2.138.2
-
Job type: Pipeline
-
Allure plugin version: 2.28.1
-
Allure commandline version: 2.10.0
Problem description
Trying to set a different results directory from allure command line used in Allure Jenkins plugin. I like to see 2 reports one for chrome and one for firefox. The results are in 2 separate directory : reports-chrome and reports-firefox but the command line combines them to a single output directory: allure-report.
I want to override the default allure-report directory using allure.results.directory
I am trying this:
allure([ includeProperties: true, jdk: '', properties: [[key: 'allure.results.directory', value:'reports-firefox']], reportBuildPolicy: 'ALWAYS', results: [[path: 'reports-firefox']] ])
But I see the command line still uses:
-c -o /datadisk/jenkins/workspace/mp_web_webdriver/allure-report
Also commented on this: https://github.com/jenkinsci/allure-plugin/issues/106
Logs ` [mp_web_webdriver] $ docker exec --env 'ALLURE_OPTS="-Dallure.results.directory=reports-firefox" ' --env BUILD_DISPLAY_NAME=#65 --env BUILD_ID=65 --env BUILD_NUMBER=65 --env BUILD_TAG=jenkins-mp_web_webdriver-65 --env BUILD_URL=<BuildURL> —env CLASSPATH= --env HUDSON_HOME=/var/lib/jenkins --env HUDSON_SERVER_COOKIE=518e490b597c9181 --env HUDSON_URL=<Build URL>--env JENKINS_HOME=/var/lib/jenkins --env JENKINS_SERVER_COOKIE=518e490b597c9181 --env JENKINS_URL=<Build URL>--env JOB_BASE_NAME=mp_web_webdriver --env JOB_DISPLAY_URL=<Build URL>job/mp_web_webdriver/display/redirect --env JOB_NAME=mp_web_webdriver --env JOB_URL=<Build URL>job/mp_web_webdriver/ --env RUN_CHANGES_DISPLAY_URL=<Build URL>job/mp_web_webdriver/65/display/redirect?page=changes --env RUN_DISPLAY_URL=<Build URL>job/mp_web_webdriver/65/display/redirect --env library.jenkins-shared.version=master 784cc24d8af747713d698e840ca1f5e52228fdacf76b4f9007ec9ecf089e2557 /datadisk/jenkins/workspace/mp_web_webdriver/node_modules/allure-commandline/bin/allure generate /datadisk/jenkins/workspace/mp_web_webdriver/reports-firefox -c -o /datadisk/jenkins/workspace/mp_web_webdriver/allure-report
Report successfully generated to /datadisk/jenkins/workspace/mp_web_webdriver/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build. `
Would be nice to hear if there is any work arounds for this atleast.
When will this be fixed, any updates on this please?
Same problem. The plugin ignores custom path settings :(
Update: it was my bad. I misunderstood the plugin configuration and did some mistakes.
pipeline {
...
post {
always {
allure ([
includeProperties: false,
jdk: '',
results: [[path: "ui-tests/target/allure-results"]],
report: "allure-report/ui-tests"
])
}
}
}
@KIVagant I tried above pipline script. Its successfully created reports and report link on jenkins job, but when i click on the report link, it says , HTTP ERROR 404 Problem accessing /index.html. Reason:
Not Found
Powered by Jetty:// 9.4.z-SNAPSHOT
It only works when report: "allure-report", if i give anything other than report: "allure-report" it wont work . Any thoughts why its happening.
I am on all latest versions of Jenkins and allure, this seems to be an issue. This is not working and a major hurdle to generate multiple allure reports. Someone, please help fix this. I am not Java Programmer, else could have taken this. 100% this is an issue and is not working.
Do we have any updates in this topic?
Any updates on this issue? This is a blocker for setting up allure report on Jenkins pipeline with axes
Same problem. The plugin ignores custom path settings :(
Update: it was my bad. I misunderstood the plugin configuration and did some mistakes.
pipeline { ... post { always { allure ([ includeProperties: false, jdk: '', results: [[path: "ui-tests/target/allure-results"]], report: "allure-report/ui-tests" ]) } } }
Were you able to solve this problem?