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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to