I have the following build scenario:
Project C depends on Project B which depends on Project A
Project X depends on C, Project Y depends on B, Project Z depends on A.
There are many other modules with dependencies, but the most "complex" build relationship is with project X. To set this up in Jenkins, I've used the Parameterized Trigger Plugin, with the "block until triggered project has finished building" option. Each buildable module gets its own Jenkins job, and the plugin is used to block on the necessary dependent build job.
I've run into 2 problems with this setup.
- Projects A and B get built many times over as they are in the transitive dependency chain for projects X, Y, Z, etc.
- Jenkins, sometimes, gets completely blocked building projects because builds for jobs X, Y, Z, etc. have filled up all available executors (being triggered by scm changes), and the dependent projects are in the queue waiting to be built.
I'm looking for advice on how to configure Jenkins for such a build environment. I'm new to Jenkins so I don't know exactly what options are available to resolve this issue.
EDIT:
All jobs are triggered by SCM changes. Dependent projects are also triggered by the Parameterized Trigger Plugin; the "block until triggered projects finish their builds" options.