Alex Rivera | Logout

Jenkins - Running instances of single build concurrently

Asked 2011-05-27T13:58:00.673
24

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

Example:

  1. Build [*jenkins_job_1*]: calls an ant script with parameter 'A'
  2. Build [*jenkins_job_1*]: calls an ant script with parameter 'B'
  3. repeat as necessary
  4. each instance of the job runs simultaneously, rather than through a queue.

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)?

Edit
Report

1 Answer

38

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.

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.

answered 2013-07-22T14:04:08.343

Your Answer