I have a problems with Hudson because my job needs two params for build the first specifies the environment and can be one of DEV, QA, PROD, and the second is a specific server, this parameter depends on the first one.
By example if I chose environment DEV, the second parameter can be only DEV1,DEV2, MAQ1 . I don't have an idea if a plugin with this functionality exists or I need to make something with groovy. I do not know please help me.
Thank you
You can use Parameterized Trigger Plugin which will let you pass parameters from one task to another. You need also add this parameter you passed from upstream in downstream.
You can generate the parameter pipeline code block easily using the Jenkins pipeline generator. You will find the Pipeline syntax generator link under all the pipeline jobs, as shown in the image below. Navigate to the pipeline generator in Jenkins and under steps, search for properties, as shown below.
Using build parameters, we can pass any data we want: git branch name, secret credentials, hostnames and ports, and so on. Any Jenkins job or pipeline can be parameterized. All we need to do is check the box on the General settings tab, “This project is parameterized”: Then we click the Add Parameter button.
Try Active Choices Plugin. It is the second name of Uno-Choice plugin, but it is located in official Jenkins repository and does not require UpdateSites Manager plugin. (Both plugins have the same author). Plugin has a great documentation with examples (and gif-demonstration) on the plugin's description page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With