sadok-f
sadok-f

Reputation: 1457

Jenkins repeatable parameters

Is there a way how to create repeatable input parameters in Jenkin build with the possibility to add/remove them?

something similar to this:

repeatable parameters

I'm creating my input parameters in Groovy, and I need a list of 2 inputs:

properties ([
  parameters ([
    string(name: "NAME", defaultValue: ""),
    string(name: 'VALUE', defaultValue:"")
  ])
])

Thank you for your help.

Upvotes: 2

Views: 225

Answers (1)

Alex O
Alex O

Reputation: 8164

No -- the number of job parameters is fixed.

Your best bet is to use a single string parameter that supports multiple values (separated by some separator) and to convert that string to an array in your job.

Upvotes: 1

Related Questions