如何在詹金斯中设置多个构建作为链接的复选框?

发布于 2025-01-12 15:29:10 字数 192 浏览 4 评论 0原文

我有一个詹金斯管道,我在其中调用另一个自由式项目来运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北凤男飞 2025-01-19 15:29:10

您可以使用主动选择参数插件并使用复选框选项进行配置。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文