I'd like to be able to run several builds of the same Jenkins job simultaneously.
Example:
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)?
If you run a single Jenkins instance with on build slaves, you can define how many concurrent build executors you want on the main configuration page at [your Jenkins URL]/configure - I've had success setting up 2 executors per CPU core available, but that will depend on what your builds do and how much CPU they need ...
Yes it's possible. Doc: If this option is checked, Jenkins will schedule and execute multiple builds concurrently (provided that you have sufficient executors and incoming build requests.)
Disable concurrent builds in Jenkins declarative pipeline. Define disableConcurrentBuilds option to disallow concurrent executions.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With