简体   繁体   English

引诱报告 Jenkins 产生 NAN% 和 null 报告 URL

[英]Allure report on Jenkins producing NAN% and null report URL

Allure report on Jenkins producing NAN% and null report URL.引诱报告 Jenkins 产生 NAN% 和 null 报告 URL。 I have a pipeline below and it is generating the report on the URL /null/.我在下面有一个管道,它正在生成关于 URL /null/ 的报告。 It was working fine before my added ${env.HOME} in my directories.在我的目录中添加 ${env.HOME} 之前它工作正常。 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.

You are creating a directory with dir("${env.HOME}/app"){...} inside the workspace.您正在工作区中使用dir("${env.HOME}/app"){...}创建一个目录。 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']]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM