Reputation: 1836
In above jenkins plugin i have set downstream project to job3 only if build succeeds but at the same time if build fails i want also redirect/downstream other project i.e job4.
can anyone please let me know how to do this? is there any other plugin in jenkins which can solve this issue?
Upvotes: 2
Views: 2083
Reputation: 89
In your Job4 config, you can set an upstream job under Build Triggers. You can choose to execute Job4 if the upstream project was stable, unstable, or fails. This may be too simple for your requirements, but it's worth a try.
Upvotes: 0
Reputation: 2121
You can create this kind of effect using the Parameterized Build plugin, and a little sideways thinking. We have jobs that sometimes trigger other jobs and sometimes don't, based on the parameters they received from upstream, or that are set by an executing job.
Trigger options include parameter values and/or the existence of a properties file, which a job could create on the fly as needed.
You might have to think through exactly what it is you're trying to accomplish, but it ought to be possible.
Upvotes: 2