Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic parameter based on previous string parameter

Tags:

jenkins

In Jenkins I have a string parameter HOST. After this parameter I have a dynamic parameter URL. This parameter needs to be a concatenation of strings, including the previously defined HOST parameter.

I have been unable to find out how to do this.

The motivation for this is subsequent parameters will also use this HOST parameter.

like image 461
Ed Heal Avatar asked Apr 13 '26 13:04

Ed Heal


1 Answers

Just make sure I understand your requirement correctly: you have two parameters and the later one is depends on the value of the first one?

If it's so I think plugin Parameterized Build is enough for this:

  • Job configuration:

parameter definition enter image description here

  • Build with specified value:

Build with specified value

  • Build result:

Build result

  • If you change your HOST value at build, the URL will also changed.

Hope this helps :-)

like image 179
shizhz Avatar answered Apr 15 '26 03:04

shizhz