Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-8985] BuildTrigger modification to handle DependencyGroups.
Pull individual Dependencys out of DependencyGroups we see in BuildTrigger.execute and make sure to actually kick those builds off as well, so that we can have two different dependencies (say, for different parameters) from one upstream project to a single downstream project.
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78c709e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we get rid of the DependencyGroup altogether and only use the generic dependency?
78c709e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still value in DependencyGroup - it lets us keep the true DependencyGraph to only one edge from each upstream project to each downstream project, which makes calculating build order, etc simpler, for example.
78c709e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that's probably true. But I think the DependencyGroup should be internal to the DependencyGraph class and not exposed. If it is exposed, like now, everybody needs to take care when calling shouldTriggerBuild of the dependency group. What do you think?
78c709e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd definitely be open to a better solution - I'm just not sure how to make it so that iterating across the downstream projects, say, will get all the elements in a dependency group rather than the dependency group itself transparently.
78c709e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have a solution: wolfs@e472fa0
If you say it's okay, I just commit it to master.