How to test multiple conditions on a conditional step?
I have a step that i want to run on a very specific scenario. For that, I'd need to test 3 environment variables.
$var1=value1
$var2=value2
$var3=value3
I'm trying to avoid chaining 3 projects.
I've read this article:( http://www-01.ibm.com/support/docview.wss?uid=swg21410161 ) but it's not clear if i can run these commands on the inside the Condition or the Command Box.
So I figured I'd ask you guys whats the best practice for this kind of situation.
The Build Forge versionis 7.1.3.2
Thanks!
2 answers
If you can run a step on Unix, you could create a step like
.bset env "CONDITION=`if [ "$var1" = "value1" -a "$var2" = "value2" -a "$var3"="value3" ]; then echo true; else echo false;fi`"
and then make the step you only want to run in that situation conditional on $CONDITION containing true.
There's probably a simple way to do this with Windows as well, but I try to avoid scripting on Windows.
.bset env "CONDITION=`if [ "$var1" = "value1" -a "$var2" = "value2" -a "$var3"="value3" ]; then echo true; else echo false;fi`"
and then make the step you only want to run in that situation conditional on $CONDITION containing true.
There's probably a simple way to do this with Windows as well, but I try to avoid scripting on Windows.