How can i trigger Job-B if Job-A is failed in jenkins build flow

9 views
Skip to first unread message

ra...@mangstor.com

unread,
Dec 13, 2016, 1:12:15 AM12/13/16
to Jenkins Users
Hi,

In Jenkins build flow iam trying to trigger Job-B when Job-A is expected to be failed. 

In below script its entering into the if condition of Job-B and iam able to see the print message as well but Job-B is not triggering. How can i handle when Job-A is expected to fail and need to trigger the Job-B

Below is my script using in buildflow: 

ignore(FAILURE) {

build("Job-A")

if (verify != success) {
println "Job-B"
build("Job-B")
}
}

-- 
Thanks & Regards,
Ravi Teja
Reply all
Reply to author
Forward
0 new messages