Search code examples
parametersjenkinshudson

How to get a parameter depend of other parameter in Hudson or Jenkins


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


Solution

  • It appears that Jenkins loads the list of parameters to select when you open the "build project" page. There's no callback happening when selecting a parameter either.

    In that case it will be difficult to restrict the second parameter based on the first one without javascript and a custom plugin.

    I also looked at those:

    I would ask the jenkins user list for more information.