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

Job DSL githubPullRequest: No signature of method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • None
    • Jenkins 2.7.2
      Job DSL Plugin 1.50
      GHPRB 1.33.1

      Job DSL testing fail after upgrading GHPRB to 1.33.1 and using new DLS (change pullRequest to githubPullRequest):

      triggers {
              githubPullRequest {
                  admins(['user1', 'user2', 'user3'])
                  orgWhitelist('ORG1')
                  useGitHubHooks()
              }
          }
      

      ./gradlew clean test output:

      12:25:56.244 [DEBUG] [TestEventLogger] com.dslexample.JobScriptsSpec > test script seed.groovy FAILED
      12:25:56.244 [DEBUG] [TestEventLogger]     Expected no exception to be thrown, but got 'javaposse.jobdsl.dsl.DslScriptException'
      12:25:56.245 [DEBUG] [TestEventLogger]         at spock.lang.Specification.noExceptionThrown(Specification.java:118)
      12:25:56.245 [DEBUG] [TestEventLogger]         at com.dslexample.JobScriptsSpec.test script #file.name(JobScriptsSpec.groovy:27)
      12:25:56.245 [DEBUG] [TestEventLogger] 
      12:25:56.245 [DEBUG] [TestEventLogger]         Caused by:
      12:25:56.246 [DEBUG] [TestEventLogger]         javaposse.jobdsl.dsl.DslScriptException: (script, line 47) No signature of method: javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.pullRequest() is applicable for argument types: (script$_run_closure2$_closure11$_closure16) values: [script$_run_closure2$_closure11$_closure16@37023619]
      12:25:56.246 [DEBUG] [TestEventLogger]             at javaposse.jobdsl.dsl.DslScriptLoader.runScriptEngine(DslScriptLoader.groovy:135)
      12:25:56.246 [DEBUG] [TestEventLogger]             at javaposse.jobdsl.dsl.DslScriptLoader.runScriptsWithClassLoader_closure1(DslScriptLoader.groovy:78)
      12:25:56.246 [DEBUG] [TestEventLogger]             at groovy.lang.Closure.call(Closure.java:414)
      12:25:56.247 [DEBUG] [TestEventLogger]             at groovy.lang.Closure.call(Closure.java:430)
      12:25:56.247 [DEBUG] [TestEventLogger]             at javaposse.jobdsl.dsl.DslScriptLoader.runScriptsWithClassLoader(DslScriptLoader.groovy:68)
      12:25:56.247 [DEBUG] [TestEventLogger]             at javaposse.jobdsl.dsl.DslScriptLoader.runScripts(DslScriptLoader.groovy:44)
      12:25:56.247 [DEBUG] [TestEventLogger]             at javaposse.jobdsl.dsl.DslScriptLoader.runScript(DslScriptLoader.groovy:58)
      12:25:56.248 [DEBUG] [TestEventLogger]             at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.groovy:182)
      12:25:56.248 [DEBUG] [TestEventLogger]             at com.dslexample.JobScriptsSpec.test script #file.name(JobScriptsSpec.groovy:24)
      12:25:56.248 [DEBUG] [TestEventLogger] 
      12:25:56.248 [DEBUG] [TestEventLogger]             Caused by:
      12:25:56.249 [DEBUG] [TestEventLogger]             groovy.lang.MissingMethodException: No signature of method: javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.pullRequest() is applicable for argument types: (script$_run_closure2$_closure11$_closure16) values: [script$_run_closure2$_closure11$_closure16@37023619]
      12:25:56.249 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.AbstractExtensibleContext.methodMissing(AbstractExtensibleContext.groovy:19)
      12:25:56.249 [DEBUG] [TestEventLogger]                 at script.run_closure2$_closure11(script:47)
      12:25:56.249 [DEBUG] [TestEventLogger]                 at script.run_closure2$_closure11(script)
      12:25:56.250 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.ContextHelper.executeInContext(ContextHelper.groovy:16)
      12:25:56.250 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.Job.triggers(Job.groovy:584)
      12:25:56.250 [DEBUG] [TestEventLogger]                 at script.run_closure2(script:46)
      12:25:56.250 [DEBUG] [TestEventLogger]                 at groovy.lang.Closure.call(Closure.java:414)
      12:25:56.251 [DEBUG] [TestEventLogger]                 at groovy.lang.Closure.call(Closure.java:430)
      12:25:56.251 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.JobParent.processItem(JobParent.groovy:134)
      12:25:56.251 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.JobParent.freeStyleJob(JobParent.groovy:46)
      12:25:56.251 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy:38)
      12:25:56.252 [DEBUG] [TestEventLogger]                 at script.run(script:28)
      12:25:56.252 [DEBUG] [TestEventLogger]                 at javaposse.jobdsl.dsl.DslScriptLoader.runScriptEngine(DslScriptLoader.groovy:129)
      12:25:56.252 [DEBUG] [TestEventLogger]                 ... 8 more
      

            daspilker Daniel Spilker
            lawyard LawYard LawYard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: