Jenkins-同时运行单个构建的实例 [英] Jenkins - Running instances of single build concurrently

查看:219
本文介绍了Jenkins-同时运行单个构建的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够同时运行同一詹金斯工作的多个版本.

I'd like to be able to run several builds of the same Jenkins job simultaneously.

示例:

  1. 构建[* jenkins_job_1 *]:调用参数为'A'的蚂蚁脚本
  2. 构建[* jenkins_job_1 *]:调用参数为'B'的蚂蚁脚本
  3. 必要时重复
  4. 作业的每个实例同时运行,而不是通过队列运行.

我要这样做的原因是避免必须创建几乎相同的几个作业,而所有这些作业都需要维护.

The reason I'd like to do this is to avoid having to create several jobs that are nearly identical, all of which would need to be maintained.

是否可以执行此操作,或者是否可以使用其他解决方案(例如,从基本作业中动态创建作业,并在完成后将其删除)?

Is there a way to do this, or maybe another solution (ie — dynamically create a job from a base job and remove it after it's finished)?

推荐答案

Jenkins有一个复选框:必要时执行并发构建"

Jenkins has a check box: "Execute concurrent builds if necessary"

如果选中此选项,它将为一个作业启动多个构建.

If you check this, then it'll start multiple builds for a job.

这与此构建已参数化"复选框一起使用.

This works with the "This build is parameterized" checkbox.

您仍然会触发构建,将您的AB作为参数传递.您可以使用其他作业来触发它们,也可以通过脚本手动执行.

You would still trigger the builds, passing your A or B as parameters. You can use another job to trigger them or you could do it manually via a script.

这篇关于Jenkins-同时运行单个构建的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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