首页 > 解决方案 > 从共享库触发 Jenkins 作业

问题描述

这就是我在共享库文件中的内容

build job: 'Job Name',
          parameters:
          [
               string(name: 'ENVIRONMENT', value: 'sit'),
               string(name: 'param1', value: 'value1' )
          ]

它失败并出现以下错误:

hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: build.call() is applicable for argument types: (java.util.LinkedHashMap) values: [[job:**********, parameters:[@string(name=ENVIRONMENT,value=sit), ...]]]
Possible solutions: call(java.lang.Object, java.lang.Object, java.lang.Object), wait(), any(), wait(long), main([Ljava.lang.String;), any(groovy.lang.Closure)

这里有什么帮助吗?

标签: jenkinsjenkins-shared-libraries

解决方案


Ok. So I figured out the problem.

One of the shared file name was build.groovy which was causing conflicts with build pipeline step. Renamed the file and that fixed the issue.


推荐阅读