allure2: Allure-results does not exists - cant change the result path
I am using Allure 2.28.1 plugin for Jenkins via declarative pipeline as below. But I could not able to read allure reports. So reports seems generated below ~/workspace/selenium_tests@2/ApiTestAutomation/ApiHubTestAutomation/target
but I could not able to change the path in script.
How can I change the allure path to read the reports from below path ? Or even if I use dir and specify the path, why allure ignore this path to generate reports ?
ubuntu@play-0:~/workspace/selenium_tests@2/ApiTestAutomation/ApiHubTestAutomation/target$ ls
allure-results generated-test-sources maven-status surefire surefire-reports test-classes
[selenium_tests] $ /home/ubuntu/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.13.5/bin/allure generate -c -o /home/ubuntu/workspace/selenium_tests/allure-report
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
allure-results does not exists
Report successfully generated to /home/ubuntu/workspace/selenium_tests/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Here is what I tried
steps {
script {
dir ('~/workspace/selenium_tests@2/ApiTestAutomation/ApiHubTestAutomation') {
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'target/allure-results']]
])
}
}
}
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 25 (8 by maintainers)
@semihural try doing this
ws
allows you to create a custom workspace with the name that you want. Usews
when you generate the results and when you generate the report. In my case I’m creating a custom workspace namedmy-workspace
. I’m usingws
in every stage.@skumar-nl for me it’s working, check the example https://github.com/allure-framework/allure2/issues/1133#issuecomment-692653151