Search code examples
jenkinsjenkins-pipelinejenkins-pluginsjenkins-groovy

How to select 3rd parameter based on 1st and 2nd parameter from Jenkins Active choice parameter


I am trying to select FINAL parameter based on INITAL and MIDDLE parameters using Active choice parameter from Jenkins.

Build With Parameters

I tried the following steps.

1, Configured Active choice parameter as shown in the image with name INITAL.

Active Choice Parameter

2, Then added Active choices reactive parameter with name MIDDLE and Referenced parameters has INITAL.

Active Choice Reactive Parameter

3, Then again added another Active Choices Reactive parameter with name FINAL and Referenced parameters has INITAL and MIDDLE.

Active Choice Reactive parameter

How to make this FINAL parameter work based on INITAL and MIDDLE parameters?


Solution

  • For parameters MIDDLE and FINAL, should use Active Choices Reactive Reference Parameter and specify Referenced parameters.

    enter image description here