Jenkinsfile 部署在黄瓜步骤失败
Jenkinsfile deployment failing at cucumber step
我的 Jenkins 部署失败并出现以下错误:
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] cucumber
Error when executing always post condition:
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
Perhaps you forgot to surround the code with a step that provides this, such as: node
这里是 cucumber 的定义:
always {
cucumber reportTitle: 'Apickli test report',
fileIncludePattern: '**/reports.json',
jsonReportDirectory: "target",
sortingMethod: 'ALPHABETICAL',
trendsLimit: 10
}
}
这是一个新的 Jenkins 构建,同样的部署在“旧”服务器上运行。我添加了黄瓜插件。我能少一个吗?
我是 Jenkins 的新手,发现这个 always {} 语句在每个阶段之后运行,需要在第一阶段解决问题。
我的 Jenkins 部署失败并出现以下错误:
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] cucumber
Error when executing always post condition:
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
Perhaps you forgot to surround the code with a step that provides this, such as: node
这里是 cucumber 的定义:
always {
cucumber reportTitle: 'Apickli test report',
fileIncludePattern: '**/reports.json',
jsonReportDirectory: "target",
sortingMethod: 'ALPHABETICAL',
trendsLimit: 10
}
}
这是一个新的 Jenkins 构建,同样的部署在“旧”服务器上运行。我添加了黄瓜插件。我能少一个吗?
我是 Jenkins 的新手,发现这个 always {} 语句在每个阶段之后运行,需要在第一阶段解决问题。