关于詹金斯(Jenkins)产生NAN%的诱人报告,并且报告URL为空

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于詹金斯(Jenkins)产生NAN%的诱人报告,并且报告URL为空相关的知识,希望对你有一定的参考价值。

关于詹金斯产生NAN%的诱人报告,并且报告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"){...}创建目录。因此,魅力未找到结果,您可以执行以下操作:

以上是关于关于詹金斯(Jenkins)产生NAN%的诱人报告,并且报告URL为空的主要内容,如果未能解决你的问题,请参考以下文章

SonarQube 没有获得单元测试覆盖率

如何在詹金斯中使用 Zap 插件执行 selenium 脚本

马克•詹金斯(MARK JENKINS)

詹金斯/哈德森环境变量

jmeter+ant+jenkins+mac报告优化

詹金斯:如何测试奴隶