Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: group jobs and limit build processors for this group

Tags:

jenkins

we are running Jenkins with lots of jobs. At the moment these jobs are kind of grouped by using "master jobs". These do nothing but start all jobs of one group. But, if one of these master jobs runs, it starts around 10 other jobs at one time. Depending on the duration of these jobs and the number of build processores (at the moment 6) Jenkins is blocked for a longer time (up to an hour). The other thing is, that these jobs are not really suitable for such massive parallelization.

To solve this, I'm looking for a way (a plugin), that allows to group some jobs and start them parallel, but limit the build processors used for the jobs of this group to a fixed number (e.g. 2). So it would be possible to run a group of jobs that compile java projects and parallel another group of jobs that installs test databases.

I tried the Build flow plugin, but it's not really the right one: you must separate the jobs manually to the sub-groups that run parallel and if a job in one sub-group failes, the following jobs of this group are not started.

So, maybe someone knows a Jenkins plugin that fits better? Thanks a lot in advance!

Frank

like image 519
Frank Winkler Avatar asked Oct 11 '12 07:10

Frank Winkler


1 Answers

Throttle Concurrent Builds Plugin

  1. Create some category my-group.
  2. Add all the jobs into this group.
  3. Set Maximum Total Concurrent Builds and Maximum Concurrent Builds Per Node.
like image 152
Draco Ater Avatar answered Oct 03 '22 19:10

Draco Ater