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

Unable to use publishers in Promoted Build plugin via DSL

XMLWordPrintable

      The current DSL support for Promoted Builds plugin does not work with publishers in action{} block. 

      freeStyleJob('test-job') {
       properties{
         promotions {
          promotion {
           name('Development')
           icon('star-red')
           conditions {
            manual('testuser')
           }
           actions {
            downstreamParameterized 
            {
             trigger('Downstream Job') {
              condition('SUCCESS')
              parameters {
               predefinedProp('Param1', 'paramValue')
              }
             }
            }
           }
          }
         }
        }
      }

      Using publisher context of Jenkins Parameterized Trigger plugin under actions{} block of promotions, fails with below error. Can you please help.
      ERROR: (script, line 14) No signature of method: javaposse.jobdsl.dsl.helpers.step.DownstreamTriggerContext.condition() is applicable for argument types: (java.lang.String) values: [SUCCESS]

            jamietanna Jamie Tanna
            hemant_sharma Hemant Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: