|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

To get the ball rolling, here is an example of some use cases that are difficult if not impossible to achieve at the moment which I would hope would be solved by this improvement:
Suppose a project has a low level 'framework' module and a higher level 'application' module which depends on it. It stands to reason that after building the 'framework' module successfully we should run a build of the 'application' module automatically so as to incorporate those framework changes. In this situation the latter, which we'll refer to as "Job A" depends on the latter which we'll refer to as "Job F". In this situation the expected behavior would be as follows:
In this scenario, the first 2 bullet points are more-or-less built into the Jenkins core via 'triggers', with the exception of item 2.2. So far as I can tell there is no way to prevent dependent projects from building when their upstreams are broken - via plugins or otherwise. Items 3 and 4 are supported by the Jenkins core but for some reason they are disabled by default. IMO if Jenkins implemented correct dependency management these options would be enabled by default. Item 5 is achievable with a fair amount of work through the use of plugins and an assortment of 'tweaks' to the Jenkins configuration.
Now, lets extend our example to include a server module, which we'll refer to as "Job S". This module will again depend on Job F - the common framework - but will be completely independent to Job A - the application. So in this case this new job would need to exhibit the same behavior as described for "Job A" above, which has the following implications:
So again, support for the first 3 items is supported by Jenkins core. Item 4 is partially support, with the exception that there is no mechanism that prevents Job A and Job S from building through independent triggers when Job F has finished building unsuccessfully. Items 5 and 6 are inherently supported by the Jenkins core. Finally, item 7 is supported via plugins with some monkeying with the configurations and triggers a bit.
Finally, lets extend our example to include a dreaded diamond dependency. Suppose now we add a forth job to our configuration which 'packages' the artifacts of all three jobs (ie: creates an installer for them). Let's call this Job I. In this situation Job I requires all other jobs to be built successfully for it to work correctly. This has the following implications:
This scenario is where things start to break down horribly for Jenkins. For example, we have the Join Plugin out our disposal, which looks like at a glance may be designed for just such a scenario. However it breaks down in several situations like items 3.1, 4 and 5 above (if memory serves). Then we have plugins like Build Flow which, again, appear to handle several of these cases correctly. If memory serves it does handle item 3.1 correctly, for example. However it too falls apart on items 4 and 5. Then, the limitations of these plugins gets exacerbated even further because many of them don't play nice with other plugins that are required to get this whole use case working. For example, neither of these aforementioned plugins work with the Priority Queue Sorter plugin, which is also need to achieve the results described above. So then you end up having to trade off one bit of functionality for another (ie: if plugin A and B won't work correctly together then you have to make a choice of which plugin is more valuable to your workflow and ditch the other one).
It is my hope that if job dependencies were modeled in the core Jenkins architecture that not only would many of these plugins become obsolete, but that the resulting behavior of the tool as a whole would become more robust as a result. Put another way, trying to "extend" Jenkins to "add" support for dependency management seems like trying to "extend" a motorcycle to be more like a transport truck by "adding" a few wheels to its axles. At best you end up with a Frankenstein like thing that doesn't quite satisfy the users expectations.