Thank you James!
Eventually yes we'd like to merge them all into one job, but since for now
the plugin is missing support for some build steps that we're using, I
guess this is the only way to get it done.
Τη Δευτέρα, 24 Νοεμβρίου 2014 12:19:15 μ.μ. UTC+1, ο χρήστης James Nord
έγραψε:
>
> Hi,
>
> the syntax is something like
>
> ArrayList<ParameterValue> yourparamaters=new ArrayList<ParameterValue>();
> yourparamaters.add(new hudson.model.StringParameterValue('PARAM','123'));
>
> build job: 'yourJobNameToBuild', parameters: yourparamaters
>
>
> you can also shorthand this if you don;t need to re-use the same parameters
>
> build job: 'yourJobNameToBuild', parameters: [new hudson.model.
> StringParameterValue('PARAM1','123'), new hudson.model.
> StringParameterValue('PARAM2','345')]
>
>
> However - I would caution against using the workflow to trigger other jobs
> if you can - It's ideal is to self contain the workflow and steps in a
> single place so you don't have configuration sprawl (the workflow and all
> the configuration of it is defined in one single place).
>
> /James
>
>
> On Monday, 24 November 2014 08:10:08 UTC, excessgr wrote:
>>
>> I'm a bit confused as to how to pass parameters to triggered jobs.
>> The snippet generator says I can pass a list of ParameterValues, but I'm
>> really unfamiliar with the internals of jenkins so I'm not sure how I can
>> pass this list.
>>
>> I assume this is what the list should look like:
>> ArrayList<ParameterValue> parameters=new ArrayList<ParameterValue>();
>> parameters.add(new hudson.model.StringParameterValue('PARAM','123'));
>>
>>
>> However I'm checking the constructor of the build step and there is no
>> such parameter to pass through.
>> How do I use the setter before the build is executed?
>>
>> Thanks.
>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/7a46830a-f067-4e6a-9fa8-2f9fce467607%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.