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

Not able to Trigger Jenkins Job from shared library file

XMLWordPrintable

      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?

       

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

              Created:
              Updated:
              Resolved: