Hi,

I am writing a job-dsl for parameterized trigger and the code snippet is
like below:


    steps{
        downstreamParameterized {
            trigger('AAA') {
                block {
                    buildStepFailure('never')
                    failure ('never')
                    unstable('never')
                }
                parameters {
                    predefinedProps([xxx: '$xxx', ooo: 'ccc', bbb: 'bbb'])
                }
            }
            
        }
    }
    configure AllNodesForLabelFactory('test_slave','Slave_label')
    
    steps{ 
        downstreamParameterized {
            trigger('bbb') {
                block {
                    buildStepFailure('never')
                    failure ('FAILURE')
                    unstable('UNSTABLE')
                }
                parameters {
                    predefinedProps([xxx: '$xxx', ooo: 'ddd'])
                }
                
            }
        }
   }
   configure AllNodesForLabelFactory('test_slave','Slave_label')

  The Static closure code looks like this:

  static Closure AllNodesForLabelFactory(String param_name,String
param_label) {
    return { project ->
      project / builders /
'hudson.plugins.parameterizedtrigger.TriggerBuilder' / configs /
'hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig' /
configFactories /
'org.jvnet.jenkins.plugins.nodelabelparameter.parameterizedtrigger.AllNodesForLabelBuildParameterFactory'
{
        name(param_name)
        nodeLabel(param_label)
        ignoreOfflineNodes(true)
      }
    }
  }

 Now when I am executing the code then only for the first block of
configuration for the AllNodesForLabelBuildParameterFactory is getting
added. But strangely the second block does not contain this configuration. 

Can anyone suggest how to fix the problem?

Thanks



--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-users-f361316.html

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1504682081468-0.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to