Why does Jenkins pipeline allows duplicate parameters?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Why does Jenkins pipeline allows duplicate parameters?

Gajanan Mahajan
In Jenkins pipeline, one can create parameter with same name twice or more(also with same type).

Let's say I've a String Parameter with name `Branch` and again I can create String Parameter with same name i.e. `Branch`. It is duplicated still I can save the pipeline.

If you access that parameter in pipeline, while both have been assigned values during trigger, value of latest parameter(i.e second defined parameter) is taken into consideration.

What is reason of Jenkins allows duplicate parameter? Is there any valid reason/use case for this? Or any technical challenges? Or known bug open?

**NOTE** Jenkins version I'm using is 2.205

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3a06271a-4b18-4a64-b210-65f644610716o%40googlegroups.com.