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

问题描述 投票:0回答:1

关于詹金斯产生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.
javascript jenkins allure
1个回答
0
投票

您正在使用工作空间内的dir("${env.HOME}/app"){...}创建目录。因此,魅力未找到结果,您可以执行以下操作:

© www.soinside.com 2019 - 2024. All rights reserved.