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

Pipeline: Build Step No signature of method: java.util.LinkedHashMap.call() in some pipelines

XMLWordPrintable

      When trying to use the build step in some jobs (declarative pipeline from within a script{} block)  it will give an error like the following:

      groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.call() is applicable for argument types: (java.util.LinkedHashMap) values: [[job:DB-migration-update-liquibase, parameters:[@string(name=DB,value=staging), ...]]]
      {{ Possible solutions: wait(), any(), wait(long), take(int), max(groovy.lang.Closure), any(groovy.lang.Closure)}}

      Sometimes this can happen where the build step previously was working then after editing the job the exact same call to build will fail with this error, the call in this specific example was taken directly from the snippet generator and worked previously.

      example:
            build job: 'DB-migration-update-liquibase', parameters: [string(name: 'DB', value: 'staging'), string(name: 'TAG', value: '${BUILD_NUMBER}')]

      I am running Jenkins 2.303.1 and have tried with both version 2.12 and version 2.15 of Pipeline: Build Step.

      I found a stack overflow with a very similar issue from over a year ago but It has no relevant answer: Strange behaviour with Jenkins' "Pipeline: Build Step" plugin

            Unassigned Unassigned
            mathconst math rick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: