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

ghprb couldn't pass the variable for triggerPhrase

XMLWordPrintable

      This is DSL script code:

      def phrase = 'testphrase'
      job("test_job") {
          displayName('test_job')
          scm {
              git {
                  remote {
                      github('xxx/xxx')
                      refspec('+refs/pull/*:refs/remotes/origin/pr/*')
                  }
                  branch('${sha1}')
              }
          }
          triggers {
              ghprbTrigger {
                  adminlist("")
                  whitelist("")
                  cron("")
                  orgslist('xxx')
                  triggerPhrase("${phrase}")
                  onlyTriggerPhrase(true)
                  useGitHubHooks(true)
                  permitAll(false)
                  autoCloseFailedPullRequests(false)
                  displayBuildErrorsOnDownstreamBuilds(false)
                  commentFilePath("")
                  skipBuildPhrase("")
                  allowMembersOfWhitelistedOrgsAsAdmin(true)
                  msgSuccess("")
                  msgFailure("")
                  commitStatusContext("")
                  gitHubAuthId("")
                  buildDescTemplate("")
              }
          }
      }
      

      This is what I got:

      No signature of method: javaposse.jobdsl.plugin.structs.DescribableContext.triggerPhrase() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [testphrase]

            daspilker Daniel Spilker
            jubel jubel han
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: