我如何使用groovy脚本获取jenkins中所有特定作业的编号? [英] How can I get all build numbers of particular job in jenkins using groovy script?
本文介绍了我如何使用groovy脚本获取jenkins中所有特定作业的编号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用主动选择插件,并且有一个groovy脚本,用于检索Jenkins中所有作业的名称。我可以编写一个groovy脚本,其中列出了该特定作业的所有内部版本号。
解决方案
您可以使用以下示例。
首先,创建用于检索作业名称的活动选择参数:
I am using active choice plugin, have groovy script which retrieves names of all jobs in Jenkins. Can I write a groovy script which get me list of all the build numbers of that particular job.
解决方案
In order to get a list of builds for a particular job using the active choice plugin, You can use the following example.
First, create an active choice parameter for retriving the job names:
Then create an active choice parameter for retriving the build numbers from the selected job:
这篇关于我如何使用groovy脚本获取jenkins中所有特定作业的编号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文