I have the following project layout:
I'm looking to setup A so that every time I want to trigger a build, it will first build B, C, and D. If either builds for B, C, or D fail then A's build should fail as well.
It seems like a common build case, but I'm not sure how to accomplish it. There are the following options but they don't seem to have the right relationship:
Is there a build configuration in Hudson (or through a plugin) that will work for me?
An upstream job is a configured project that triggers a project as part of its execution. A downstream job is a configured project that is triggered as part of a execution of pipeline.
Upstream Trigger You may subscribe to may upstream projects with specified trigger threshold. Unlike the build trigger in the upstream project which you can pass the parameters to the downstream build. The upstream trigger subsciption model does not offer parameters to pass information between builds.
Select a job that triggers a remote one and then go to Job Configuration > Build section > Add Build Step > Trigger builds on remote/local projects option. This configuration allows you to trigger another exciting job on a different CM (remote). The downstream job name part will autocomplete.
This came up on the Hudson mailing list very recently. There is no direct support for this type of build configuration in Hudson.
See this thread: http://jenkins.361315.n4.nabble.com/On-demand-build-dependency-handling-simple-2-job-build-td624395.html
You could use the Join plugin to create a 'build+deploy' job. It would have B,C and D as downstream projects, and then 'A' would become the join target.
Thus B C and D would need to complete successfully. If so, then the plain 'deploy' job of A would be launched. If there were any error, A would not launch. This is effectively the same as what you are asking for.
You can read about the join plugin here: http://wiki.hudson-ci.org/display/HUDSON/Join+Plugin
Take a look at the Apache Ivy project (http://ant.apache.org/ivy/). It handles project dependencies very well, and it has a plugin for Hudson. From the way you describe the problem, I think this solution would work for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With