Reputation: 385
Allure report on Jenkins producing NAN% and null report URL. I have a pipeline below and it is generating the report on the URL /null/. It was working fine before my added ${env.HOME} in my directories. But now it does not work
pipeline {
agent {
label {
label ""
customWorkspace "${env.HOME}/test"
}
}
tools {nodejs "node"}
stages {
stage('Checkout App') {
steps {
dir("${env.HOME}/app") {
echo "Building.."
sh 'git pull'
}
// build shopfloor app
dir("${env.HOME}/app") {
sh "/${env.HOME}/test/App.sh"
}
}
}
}
post('Publish Report') {
always {
script {
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'target/allure_results']]
])
}
}
}
}
It says allure report generated on:
allure-results does not exists
Report successfully generated to /Users/john/.jenkins/null/test/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Upvotes: 0
Views: 4171
Reputation: 696
You are creating a directory with dir("${env.HOME}/app"){...}
inside the workspace. For that reason, allure didn't find the results, you could do something like this:
Check if the path is correct, but this will be an example:
results: [[path: '$WORKSPACE/${env.HOME}/app/target/allure_results']]
Upvotes: 1