Hi Christian,
I don't believe the UI that's presented in the jobs configuration is there for this purpose. As far as I can see, if you select Throttle this project as part of one or more categories the 2 Maximum Concurrent Builds textboxes are ignored. Those textboxes are only used when the Throttle this project alone radio is selected.
At least, from my limited understanding of the plugin that's how it works.
I've been spending a bit of time on this issue.
The solution I have implemented so far is,
- I added a new checkbox that belongs to the Throttle this project as part of one or more categories radio
- The new checkbox Let this Job be blocked by selected Categories (it's a working title) will block a job if any builds from any of the selected categories are queued or executing
This in effect lets you select 1 or more jobs that will not execute while jobs from it's categories are executing.
What do you think of this solution?
I'd like to get some community feedback before I make a pull request.
Thanks!
P.S:
I was also considering fixing the UI so the "child" options only show up when you select it's parent radio button. But that's part of a different issue.
I think the ideal way to solve this is to have a multi-project throttle category that you assign to all your jobs.
The multi-project throttle category should be able to have high limitations or no limitations at all.
If you then create:
jobA and jobB with the limitations 0/0 they should be able to run concurrently up to the multi-project throttle category limitations.
jobC with the limitations 1 per node, jobC should only run on a node if no other job with the throttle category runs on the node.
jobD with the limitations 1 in total, jobD should only run if no other jobs of this category is running.
The UI to support this is already there, I have tried to set this up since I thought that it should work before I saw this issue