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

Unable to use publishers in Promoted Build plugin via DSL

    Details

    • Similar Issues:

      Description

      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]

        Attachments

          Activity

          hemant_sharma Hemant Sharma created issue -
          hemant_sharma Hemant Sharma made changes -
          Field Original Value New Value
          Description 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]
          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]

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              hemant_sharma Hemant Sharma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: