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

Job DSL should support parameterizedtrigger.BuildTrigger

XMLWordPrintable

      We need assistance solving this error:
      ERROR: Found multiple extensions which provide method buildTrigger with arguments [nw_bug_test$_run_closure1$_closure6$_closure15@20b9fbfc]: [hudson.tasks.BuildTrigger, hudson.plugins.parameterizedtrigger.BuildTrigger]
      14:41:46 Finished: FAILURE
      That we're getting from this DSL

      publishers {
              buildTrigger {
                  configs {
                      buildTriggerConfig {
                          configs {
                              predefinedBuildParameters {
                                  properties("ACT_BUILD_URL=\$BUILD_URL")
                                  textParamValueOnNewLine(false)
                              }
                          }
                          projects("project")
                          condition("FAILED_OR_BETTER")
                          triggerWithNoParameters(false)
                          triggerFromChildProjects(false)
                      }
                  }
              }
          } 

      Trying to get it to work with a configure block has been really confusing and isn't working either

      My configure block

         

           it / 'publishers' / 'hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.45"' / 'configs' / 'buildTriggerConfig' {
                  configs {
                      predefinedBuildParameters {
                          'properties'("ACT_BUILD_URL=\$BUILD_URL")
                          'textParamValueOnNewLine'('false')
                      }
                  }
                  'projects'("project")
                  'condition'("FAILED_OR_BETTER")
                  'triggerWithNoParameters'('false')
                  'triggerFromChildProjects'('false')
              }

      <removed error here as it was a red herring>

      Seems like others also need guidance ie

      https://stackoverflow.com/questions/47313446/jenkins-dsl-script-multiple-extensions-found

      https://stackoverflow.com/questions/51564810/jenkins-dsl-script-test-failure-found-multiple-extensions-which-provide-meth

       

       

            Unassigned Unassigned
            pgluss11 pam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: