[workflow-plugin] keeping default parameters in build step

38 views
Skip to first unread message

Eric Engel

unread,
Sep 10, 2015, 12:12:43 PM9/10/15
to jenkins...@googlegroups.com

Hi,

 

I have this scenario:

 

Job X with default Parameters A=1, B=2 and C=3. Workflow Job Y calls Job X with a build step:

 

>build job: 'X', propagate: false, parameters: [new hudson.model.StringParameterValue('A', '2'), new hudson.model.StringParameterValue('B', '3')]

 

What happens: Job X is called only with parameters A and B. Parameter C is missing. The job fails.

What I expect: Job X is called with parameter A and B. Parameter C automatically gets the default value.

 

Is there a flag or other easy way to keep default parameters if no parameter is given by the build step?

Ideally I do not want to include all the default parameters into the workflow script.

 

Regards

Eric

Michael Neale

unread,
Sep 11, 2015, 4:13:56 AM9/11/15
to Jenkins Users, e...@ivu.de
Eric, this sounds like a bug, not a feature missing (or are they the same thing ? ;), worth opening a ticket for? 

Daniel Beck

unread,
Sep 13, 2015, 1:34:22 AM9/13/15
to jenkins...@googlegroups.com
It behaves like the internal APIs do, not enforcing anything on parameters being passed to builds -- which means defined parameters may not be set, and undefined parameters may be set.

Which is probably the wrong approach for a user-facing script DSL.
> --
> 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-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/864e409e-0535-415e-a5c8-0753262e3b9c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages