Strinder
Strinder

Reputation: 2250

How to run a Jenkins build only if another build has been successful?

I want Jenkins to run a regularly scheduled build A only if another regularly scheduled build B has been successful. If the build A has failed the this way dependent build B should not run (since it would fail also). I don't want to trigger B from A directly since B as a completely other schedule (runs more infrequently).

Upvotes: 15

Views: 19276

Answers (2)

Jason Swager
Jason Swager

Reputation: 6501

I would recommend the Parameterized Trigger Plugin. As a post-build step on B, have job A be triggered on a successful build. You don't have to specify parameters.

Upvotes: 0

malenkiy_scot
malenkiy_scot

Reputation: 16615

Try BuildResultTrigger Plugin - you can set it in job B to poll the results of job A with the desired (un)frequency.

Upvotes: 12

Related Questions