your Step 1 returns 1 which is a failure and Jenkins is always going to stop build execution at that point. no other "build steps" will be executed.
You can install the flexible publish plugin (this lets you can run many build steps in the Post-build phase). the condition can be set to test the "Current build status" where you can set Worst as Failed and best as Success, then I think it will always run. On Mon, Apr 10, 2017 at 5:29 PM, Alex Domoradov <alex....@gmail.com> wrote: > Hello, > > is it possible at all? I have tried to use Conditional BuildStep with > condition "Always" but without success. I have two build step each of them > is shell script. > > Build step1 - Execute shell > #!/bin/bash -ex > > echo "******* STEP1 *******" > exit 1 > > Build step2 - Execute shell > #!/bin/bash -ex > > echo "******* STEP2 *******" > exit 0 > > Conditional step (single) > Run?: Always > Builder: Execute shell > #!/bin/bash > > echo "%%%%%%% CLEAN %%%%%%%" > > With such settings I get the following result > > Started by user Alex > [EnvInject] - Loading node environment variables. > Building on master in workspace /usr/share/tomcat8/.jenkins/workspace/temp > Run condition [Always] enabling prebuild for step [Execute shell] > [temp] $ /bin/bash -ex /var/cache/tomcat8/temp/hudson8076614436373471043.sh > + echo '******* STEP1 *******' > ******* STEP1 ******* > + exit 1 > Build step 'Execute shell' marked build as failure > Finished: FAILURE > > P.S. > Jenkins ver. 1.652 > > -- > 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. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/0c5b0978-570f-4871-b2cc-4ca806774dbb%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/0c5b0978-570f-4871-b2cc-4ca806774dbb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Dick Ginga Build Engineer rgi...@disruptorbeam.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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaXQpOg_PCwKJ-KAgbQDYNHqumnqa5w7s4yrkgw%3DgnsFow%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.