jenkinsci / jenkinsci/parameterized-trigger-plugin
[JENKINS-50802] jobdsl & hudson.plugins.parameterizedtrigger.FileParameterFactory duplicate xml fragment
- 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
{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
Raw content of original issue
Friends:
Thank You for your time and attention in advance.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") } } } }
Need to understand something.
I am using jobdsl and I am seeing some strange behaviour.
With the following jobdsl
{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
Assessment
This issue has not been assessed yet.