Cascaded choice parameters and parameter validations in Jenkins pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cascaded choice parameters and parameter validations in Jenkins pipeline

Ven H
Hi,

I have a Jenkins pipeline job. I need to define parameters with the following requirements.

1. I have choice parameters which need to be populated from method calls.

2. Some choice parameters need to be populated from method calls, but based on the selection of some other choice parameters. For example, let's say, my first choice parameter is the list of countries, which is populated from a method call. Once a country is selected, the states will have to be populated based on that, as another choice parameter and so on.

3. I need to validate parameters. For example, if a string parameter is empty, I should enforce the user to enter a value and not allow a submission without it.

If anyone can help with some references and examples, it will be really great.


Regards,
Venkatesh

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28epijA30%3D1JOqLy4iQsBQ_jrD6iockNyjrcAbNyGLrM2%3Dw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Cascaded choice parameters and parameter validations in Jenkins pipeline

Ven H
Can anyone please help with this?

Regards,
Venkatesh


On Sun, Sep 27, 2020 at 11:51 PM Ven H <[hidden email]> wrote:
Hi,

I have a Jenkins pipeline job. I need to define parameters with the following requirements.

1. I have choice parameters which need to be populated from method calls.

2. Some choice parameters need to be populated from method calls, but based on the selection of some other choice parameters. For example, let's say, my first choice parameter is the list of countries, which is populated from a method call. Once a country is selected, the states will have to be populated based on that, as another choice parameter and so on.

3. I need to validate parameters. For example, if a string parameter is empty, I should enforce the user to enter a value and not allow a submission without it.

If anyone can help with some references and examples, it will be really great.


Regards,
Venkatesh

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28erubHjb6vZe8u%2BydHwp_7B5znQ_JpEpkPpffBSyOzYWcg%40mail.gmail.com.