Reputation: 479
I am using Jenkins version - v2.73.2
and Jenkins pipeline - 2.5 and wanted to have below multi select options. Users should be able to choose more than one option.
Build
Deploy
Analysis
Test
For example, if user selects the options- Build , Analysis and Test. First Build job should be executed then Analysis and Test. If user selects the 'Analysis' option , sub-options need to be displayed like 'Choose Instance' - Dev , QA, PreProd and Prod.
Right now i am able to create the multi select options to select Build, Deploy , Analysis and Test using 'Extended Choice Parameter plugin'
and now i want to add sub list option if 'Analysis' is selected. Please share your inputs how can i acheive this scenario.
Upvotes: 0
Views: 2209
Reputation: 2882
This is not possible in Jenkins build with parameters page. Parameters are loaded all at once, and cannot have logic that depends on the value of another one.
If you truly need this you will need to use an input step after job kickoff to evaluate the 1st provided param and provide a list for the user to choose from.
This is because params are 'post processed', they are evaluated/executed during job execution. This is why you need a single run of a pipeline job before 'Build' becomes 'Build with parameters'.
Upvotes: 1