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

jobdsl & hudson.plugins.parameterizedtrigger.FileParameterFactory duplicate xml fragment

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Friends:
       
      Thank  You for your time and attention in advance.

       
      Need to understand something.
       
      I am using jobdsl and I am seeing some strange behaviour.
       
      With the following jobdsl
       

      job('example') {
          steps {
              downstreamParameterized {
                  trigger('Project1') {
                      block {
                          buildStepFailure('FAILURE')
                          failure('FAILURE')
                          unstable('UNSTABLE')
                          
                      }
                      parameterFactories {
      // Looks for files that match the specified pattern in the current build, then for each of them trigger a build of the specified project(s) by passing that file as a file parameter.
      forMatchingFiles("cool", "test")
                      }
                      
                  }
              }
          }

      {quote}}  

       
      the xml in attachment1 gets created.

      Then I made changes to add the changes with configure block to add the xml fragment for hudson.plugins.parameterizedtrigger.FileBuildParameterFactory
       

      job('example') {

          steps {

              downstreamParameterized {

                  trigger('Project1') {

                      block {

                          buildStepFailure('FAILURE')

                          failure('FAILURE')

                          unstable('UNSTABLE')

                          

                      }

                      parameterFactories {

      // Looks for files that match the specified pattern in the current build, then for each of them trigger a build of the specified project(s) by passing that file as a file parameter.

      forMatchingFiles("cool", "test")

                          

                          configure {

                              it /'builders'/'hudson.plugins.parameterizedtrigger.TriggerBuilder'/'configs'/'hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig/configFactories'/'hudson.plugins.parameterizedtrigger.FileBuildParameterFactory'

                       }

                      }

                      

                  }

              }

          }

      {quote}}  


       
      This one produces xml with attachment 2
       
      Expected output (job created manually and output captured.
       


       
       
      Output that gets created with jobDSL
       

       
       
      Can folks provide help or advise on what I might be doing wrong ?
       
       
      Regards,
      -Narahari

        Attachments

        1. Attachment1
          0.6 kB
        2. Attachment2
          0.9 kB

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              savithari Narahari Lakshminarayana
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: