Let's say I have the following use case. I have 3 choice parameters, namely, Country, State, City. I have shared library steps to GetCountries, then GetStates with country as argument and then GetCities with country and state as arguments. In my pipeline job, I will have 3 Choice parameters, one each for Country, State and City, with a cascading functionality, which is, when I select a Country, the states will be populated accordingly and upon selection of a state, cities will be populated accordingly.
choice(name: 'Country', description: 'Select Country', choices:'GetCountriesFromSharedLibStep')
choice(name: 'State', description: 'Select State', choices:'GetStatesFromSharedLibStep('${params.Country}')
choice(name: 'City', description: 'Select City', choices:'GetCitiesFromSharedLibStep('${params.Country}',
'${params.State}'
)
Has anyone had this kind of a requirement. If so, how to achieve this? Please help with some examples / code.