如何获取参数取决于Hudson或Jenkins中的其他参数 [英] How to get a parameter depend of other parameter in Hudson or Jenkins

查看:98
本文介绍了如何获取参数取决于Hudson或Jenkins中的其他参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在哈德森遇到问题,因为我的工作需要两个参数来构建 第一个指定环境,可以是DEV,QA,PROD, 第二个是特定的服务器,此参数取决于第一个.

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.

例如,如果我选择环境DEV,则第二个参数只能是DEV1,DEV2,MAQ1 . 我不知道是否存在具有此功能的插件,或者我需要使用Groovy制作东西.我不知道请帮助我.

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.

谢谢

推荐答案

当您打开构建项目"页面时,Jenkins似乎加载了要选择的参数列表.选择参数时也不会发生回调.

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.

在这种情况下,如果没有javascript和自定义插件,则很难根据第一个参数来限制第二个参数.

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

我也看了那些:

  • https://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin
  • https://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+Script+plugin
  • https://wiki.jenkins-ci.org/display/JENKINS/Extensible+Choice+Parameter+plugin

我会向詹金斯用户列表询问更多信息.

I would ask the jenkins user list for more information.

这篇关于如何获取参数取决于Hudson或Jenkins中的其他参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆