如何在詹金斯中设置多个构建作为链接的复选框?
我有一个詹金斯管道,我在其中调用另一个自由式项目来运行 ant 构建。
我已更改此自由式项目以传递 github 存储库 url 作为参数。
现在,我想提供一组存储库作为此参数中的条目,以便当用户单击构建时所有这些存储库应显示为复选框,并且无论选中什么,所有这些存储库都应使用参数一一触发到同一个自由式项目值改变了。
如何实施?
I have a jenkins pipeline where I am calling one more freestyle project to run an ant build.
I have changed this freestyle project to pass github repo url as parameter.
Now, I want to provide set of repositories as an entry in this parameter so that all those repositories should be shown as checkboxes when user clicked on build and whatever checked, all those repositories should be triggered one by one to the same freestyle project with parameter value changed.
How to implement this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用主动选择参数插件并使用复选框选项进行配置。
https://plugins.jenkins.io/uno-choice/
在构建作业时您选择的 URL 将以字符串格式提供,每个 URL 将用“,”分隔。
您可以使用正则表达式分隔每个 URL 和条件语句,以从管道脚本触发自由式作业。
You can use active choice parameter plugin and configure with check box option.
https://plugins.jenkins.io/uno-choice/
While building the job all the URL's which you have selected will be available in string format and each URL will be separated by ",".
You can use regular expression to separate each URL and conditional statements to trigger the freestyle job from pipeline script.