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

Unable to use publishers in Promoted Build plugin via DSL

      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]

          [JENKINS-44118] Unable to use publishers in Promoted Build plugin via DSL

          Hemant Sharma created issue -
          Hemant Sharma made changes -
          Description Original: The current DSL support for Promoted Builds plugin does not work with publishers in action\{} block. 
          {code:java}
          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')
                  }
                 }
                }
               }
              }
             }
            }
          }{code}
          Using publisher context of Jenkins Parameterized Trigger plugin under actions\{} block of promotions, fails with below error. Can you please help.
          ERROR: (script, line 51) No signature of method: javaposse.jobdsl.dsl.helpers.step.DownstreamTriggerContext.condition() is applicable for argument types: (java.lang.String) values: [SUCCESS]
          New: The current DSL support for Promoted Builds plugin does not work with publishers in action\{} block. 
          {code:java}
          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')
                  }
                 }
                }
               }
              }
             }
            }
          }{code}
          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]
          Jamie Tanna made changes -
          Assignee Original: Daniel Spilker [ daspilker ] New: Jamie Tanna [ jamietanna ]

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

              Created:
              Updated: