jenkinsci / jenkinsci/parameterized-trigger-plugin

[JENKINS-50802] jobdsl & hudson.plugins.parameterizedtrigger.FileParameterFactory duplicate xml fragment

Open
#745 0 comments 0 reactions 0 assignees View on GitHub
component:parameterized-trigger-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
77
Forks
174
Avg merge
22h 27m
Merged PRs (30d)
1

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

---
Originally reported by savithari, imported from: jobdsl & hudson.plugins.parameterizedtrigger.FileParameterFactory duplicate xml fragment


  • status: Open
  • priority: Minor
  • component(s): parameterized-trigger-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

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

2 attachments

- [Attachment1](https://issues.jenkins.io/secure/attachment/42166/Attachment1)
- [Attachment2](https://issues.jenkins.io/secure/attachment/42165/Attachment2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.