Hi Eric

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')]


The next thing you need is the list of parameters the workflow was invoked 
with - 
(I am guessing from scanning the source - so may not be 100% correct) 

The parameters are all exposed to the to the workflow as variables
so parameter "BOB" with value "TrueGent" can be accessed as BOB
e.g.
  echo "the value of BOB is " + BOB

if you don't actually know what parameters you want (ie you want all of 
them) then I think you need to retreive them programatically (I don't 
beleive they are injected as a list of paramatervalues - or a map by 
default - so you may require a custom step implementation - however I'm 
sure someone will pipe up with a quick and easy way to do it.

/James




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 Thursday, 20 November 2014 18:01:07 UTC, Eric Engel wrote:
>
> Resending with correct subject 
>
> -----Ursprüngliche Nachricht----- 
> Von: [email protected] <javascript:> [mailto:
> [email protected] <javascript:>] Im Auftrag von Eric Engel 
> Gesendet: Donnerstag, 20. November 2014 16:33 
> An: [email protected] <javascript:> 
> Betreff: AW: Last Success shows unexpected time 
>
> Hello Jenkins Users, 
>
> we want to try the new jenkins workflow-plugin. Is there any documentation 
> besides the information from github 
> https://github.com/jenkinsci/workflow-plugin ? 
> Especially a simple question: How to start a parameterized job? Ideally 
> with all parameters from the parent job. 
>
> Regards, 
> Eric 
>
> -- 
> 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] <javascript:>. 
> For more options, visit https://groups.google.com/d/optout. 
>

-- 
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/8574c186-9c3d-426e-808d-febe7348dc43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to