jenkins工作流插件MissingMethodException

时间:2015-09-13 12:50:50

标签: jenkins-workflow

我正在尝试使用jenkins工作流程插件并启动了教程https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md

我正在使用jenkins 1.628 CloudBees Build Flow 0.18 tomcat 7.0.56 java 1.8.0_25以及新安装的所有最新工作流程插件。

当我尝试第一个例子时

echo 'hello from Workflow'

我收到此错误

ERROR: Failed to run DSL Script
groovy.lang.MissingMethodException: No signature of method: 
com.cloudbees.plugins.flow.FlowDelegate.echo() is applicable for 
argument types: (java.lang.String) values: [hello from Workflow]

如果我将代码更改为

println 'hello from Workflow'

工作正在运行。

如果我尝试下一个例子

node { 
    git url: 'https://github.com/jglick/simple-maven-project-with-tests.git'  
    def mvnHome = tool 'M3' 
    sh "${mvnHome}/bin/mvn -B verify"
}

发生此错误

ERROR: Failed to run DSL Script groovy.lang.MissingMethodException: 
No signature of method: 
com.cloudbees.plugins.flow.FlowDelegate.node() 
is applicable for argument types: (Script1$_run_closure1) values: 
[Script1$_run_closure1@1dbe8f29]

我错过了什么?

0 个答案:

没有答案