Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins, Block or fail a job if any of its upstream jobs failed or unstable

Tags:

jenkins

What is the best approach to block or fail a Jenkins downstream job if any of its upstream jobs have failed or are unstable?

At the moment i have got the "Block build when upstream project is building" option ticked and that's working fine as my downstream job is waiting all the upstream job to finish building. However i don't want to build the job if any of the upstream failed or is unstable.

Thanks

like image 741
Tekdev Avatar asked Apr 10 '13 17:04

Tekdev


1 Answers

When you make a job dependent on prior jobs, the trigger is visible both in the triggering job at the bottom and the triggered job at the top. If you look at the triggering job at the bottom, there are options to decide if the job is triggered only on success or regardless of the outcome of the job.

Make sure the setting in the Build Other Projectssetting is set to Trigger only if build succeeds

like image 172
gaige Avatar answered Oct 23 '22 13:10

gaige