The build flow plugin 
(https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin) is just for you.

You would set up the master job as a build flow job and set up logic similar to 
this:

guard{
        build("setup")
        build("run-tests")
}rescue{
        build("cleanup")
}

Think of guard as "try" and rescue as "finally". The logic above will try to 
run "setup" and will try to run "run-tests" if "setup" succeeds.  No matter 
what succeeds, or does or doesn't run, this will try to run "cleanup".

--Rob

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of cpjust
Sent: Sunday, January 19, 2014 2:45 AM
To: [email protected]
Subject: Post build action -- how can I build job B if A is successful or job C 
if A fails?

I'd like to split a job into 3 jobs:
  1. setup
  2. run-tests
  3. cleanup

If setup is successful, it should launch the run-tests job.  If it fails, it 
should run the cleanup job.
The run-tests job should always run the cleanup job.

The "Build other projects" plugin doesn't have that functionality and when I 
did a search, I couldn't find anything that looked like it would do that.

Are there any other plugins that I missed that would let me do this?



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Post-build-action-how-can-I-build-job-B-if-A-is-successful-or-job-C-if-A-fails-tp4687732.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

The information in this message is for the intended recipient(s) only and may 
be the proprietary and/or confidential property of Litle & Co., LLC, and thus 
protected from disclosure. If you are not the intended recipient(s), or an 
employee or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any use, dissemination, distribution or 
copying of this communication is prohibited. If you have received this 
communication in error, please notify Litle & Co. immediately by replying to 
this message and then promptly deleting it and your reply permanently from your 
computer.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to