Do conditional steps in Build Forge actually work?
4 answers
Echo it worked
Example 2
Created two environment variables. TEST and TESTING. TEST has no value while TESTING has texttext
Step 1
hastext(${TESTING})
RESULT:
Echo it Worked
Step 2
hastext(${TEST})
RESULT:
Echo Failure
How are you trying to set the variable? Via .bset or from a variable created within BF. Also, what is the version of Build Forge you are using? .bset has limitations or best practices in the way it should and should not be used. Here is a link on that below. Any additional details you can offer up would be great too. Thanks!
http://pic.dhe.ibm.com/infocenter/bldforge/v7r1m3/index.jsp?topic=%2Fcom.ibm.rational.buildforge.doc%2Ftopics%2Fdotcmd_bset.html
Comments
The variable in question is part of the BF project env. I am trying to determine if that variable has content (hastext). When it evaluates: hastext (${PRIMARY_DIR}) it is showing as false:
Comments
I have two BF projects (A and B). One project (A) has a variable PRIMARY_DIR, the other project (B) has variable bfbuild_xml_location. I now need to chain a project from A and B. Inside this project I need to know which variable has value, so I can run the correct command. I set a step to be conditional, as referenced above. If I am running project "A" the condition should evaluate to true, but as you can tell it is evaluating to false. If I launch project "B" it will evaluate to false, but I really don't think it is evaluating it properly because of project A response.
As an example here is a run from project B
COND The condition on the step [hastext(PRIMARY_DIR)] evaluated true, this step will continue to be executed. EXEC Locale set to 'C' PTY allocated pseudo-tty pipe
This should evaluate to false as PRIMARY_DIR doesn't exist in Project B
We are running 7.1.3.3