giuspen
giuspen

Reputation: 1401

Jenkins Fail Downstream Jobs After Failure

I'm in the need to Fail all the Downstream Jobs after a Failure in the Father Job.

Let's say I have

Job A -> Job B -> Job C

Where a Downstream Job is Run Only if the Upstream Succeeds.

I need:

I didn't find a suitable plugin to achieve this result, maybe somebody with the same need found a way?

Upvotes: 1

Views: 640

Answers (1)

Ivan
Ivan

Reputation: 2340

Since it is possible to trigger job B and / or C as a downstream from A even A was failed - determine the A status and create a variable that will determine if job B or C should be run ( like RUN=1 for do_run ). Then add a parameter to downstream jobs and check the variable in the beginning of job B or C.

Wouldn't it be better to not run B or C at all when A fails? Don't know what you are trying to do, but just suggesting.

Upvotes: 1

Related Questions