关于 Jenkins 产生 NAN% 和空报告的 Allure 报告 URL
Allure report on Jenkins producing NAN% and null report URL
关于 Jenkins 生成 NAN% 和空报告的 Allure 报告 URL。我在下面有一个管道,它正在 URL /null/ 上生成报告。在我的目录中添加 ${env.HOME} 之前它工作正常。但是现在不行了
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']]
])
}
}
}
}
它说魅力报告生成于:
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.
您正在工作区内创建一个包含 dir("${env.HOME}/app"){...}
的目录。由于这个原因,allure 没有找到结果,你可以这样做:
检查路径是否正确,这只是一个例子:
results: [[path: '$WORKSPACE/${env.HOME}/app/target/allure_results']]
关于 Jenkins 生成 NAN% 和空报告的 Allure 报告 URL。我在下面有一个管道,它正在 URL /null/ 上生成报告。在我的目录中添加 ${env.HOME} 之前它工作正常。但是现在不行了
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']]
])
}
}
}
}
它说魅力报告生成于:
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.
您正在工作区内创建一个包含 dir("${env.HOME}/app"){...}
的目录。由于这个原因,allure 没有找到结果,你可以这样做:
检查路径是否正确,这只是一个例子:
results: [[path: '$WORKSPACE/${env.HOME}/app/target/allure_results']]