Why does Jenkins pipeline allows duplicate parameters?

14 views
Skip to first unread message

Gajanan Mahajan

unread,
Aug 14, 2020, 11:13:36 PM8/14/20
to Jenkins Users
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
Reply all
Reply to author
Forward
0 new messages