使用Uno-choice插件的参数化作业

时间:2015-09-21 10:30:07

标签: groovy jenkins jenkins-plugins

我正在使用Uno choice plugin根据之前的选择选择参数值。

(这个插件帮我减少了参数数量。我可以根据平台选择为多个平台重用相同的参数)

我使用groovy脚本来选择参数值。

但加载参数需要太多时间。

有没有办法加快这个过程?

1 个答案:

答案 0 :(得分:0)

我遇到过类似的问题,我也使用groovy脚本来编写shell脚本。我做了以下事情以减少时间: -

当您单击带有参数的构建时,所有任务(一起运行的脚本)将立即执行。 正确使用其他条件。 也可以使用Fallback脚本。

例如: -

你有

等参数

1)国家 2)状态 3)城市

每个参数都取决于之前的值。

1) Try to only display contents on Jenkins front-end.(cat command).
2) Call a script if only it matches valid values in the previous parameter.   
3) minimum on the fly scripts.
4) optimize delays/sleep according to your load time.
5) Remove any extensions whether in chrome/Firefox.
5) Try using the same page in incognito mode.
6) If options are invalid through invalid option without going into any computation.
7) Uninstall plugin which are not required.

我会发现更多建议。

如果您找到任何优化时间的方法,我也会要求您更新。