猿问

通过管道脚本生成诱惑报告时,hudson.FilePath 丢失错误

我向管道添加了新阶段:


stage('reports') {

    steps {

    script {

            allure([

                    includeProperties: false,

                    jdk: '',

                    properties: [],

                    reportBuildPolicy: 'ALWAYS',

                    results: [[path: 'target/allure-results']]

            ])

        }

    }

}

但作业失败并出现错误:


hudson.remoting.ProxyException: org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing

    at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260)

    at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:262)

Caused: hudson.remoting.ProxyException: org.codehaus.groovy.runtime.InvokerInvocationException: org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing

测试是写在 Python 和 xml 上生成的报告,但不是诱惑报告。


你能帮我解决这个错误吗?


守着一只汪
浏览 551回答 1
1回答
随时随地看视频慕课网APP

相关分类

Python
我要回答