Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55163

Not able to Trigger Jenkins Job from shared library file

    Details

    • Similar Issues:

      Description

      This is what I have in my shared library groovy file

       

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

      It is failing with below error :

       

      {{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)}}

      I also literally copied the same text as generated by Snippet Generator and even that threw the same error!

       

      Can you please advise on what's the correct function call?

       

        Attachments

          Activity

          Hide
          avadhmr Avadh Sharma added a comment -

          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.

          Show
          avadhmr Avadh Sharma added a comment - 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.

            People

            • Assignee:
              Unassigned
              Reporter:
              avadhmr Avadh Sharma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: