Having looked at this again, you should be able to do what you want in the 
shell script itself. I am not an expert here, so I will not attempt a solution.

Find the Build Flow Plugin details here:

https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin

you would create a Jenkins job for each step.
Each job would have to return success or failure.
In the Build Flow window, you would do something like this:

a=build(“Build-Step-1”)

if (a.result =~ "SUCCESS") {
b=build(“Build-Step-2”)
}
else {
build.setResult(“SUCCESS”)
}


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Panikera Raj
Sent: Monday, November 10, 2014 11:23 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Stop the execution if First task is failed even if multiple tasks 
are added to the project

​Can you provide code snippet or can you explain bit more about how to use and 
where to specify...


Regards,
Panikera

On Mon, Nov 10, 2014 at 7:08 PM, Ginga, Dick 
<dick.gi...@perkinelmer.com<mailto:dick.gi...@perkinelmer.com>> wrote:
You can certainly do it with the Build Flow (DSL) plugin

From: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
[mailto:jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com>]
 On Behalf Of Panikera Raj
Sent: Monday, November 10, 2014 8:36 AM
To: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com>
Subject: Fwd: Stop the execution if First task is failed even if multiple tasks 
are added to the project


Hi All,
I have a project in Jenkins (as free style project) where I have added multiple 
tasks as an attachment. As I showed in attachment in first task condition is 
not satisfied I need to come out from the execution I don't want to execute 
second task.
I can put exit 1. But If condition is not matched project will get marked as 
Failure and mail will go to every one. So if put just exit 0. It will come out 
from the first task then once again second task will execute. I don't want to 
be execute like this.
Is there a way where if first task not satisfied condition we can come out from 
complete execution(with out executing second task)

Regards,
Panikera


--
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 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
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 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.

--
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 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to