It's all about the answers!

Ask a question

How2 create env-var by add-/subtracting from existing var?


Rune Hellem (1122) | asked Jan 03 '11, 4:30 a.m.
In the environment for the project we have a variable containing all the WebSphere nodes in the project. Doing a task I need to skip the first one (not being a regular WAS node), so in the while condition I'm using
true(${BF_ITERATION}<=(${NUMBER_OF_NODES} - 1)) 

which is working as intended, but then in the command I need to use BF_ITERATION + 1, trying this
.bset env "ACTUAL_NODE=${BF_ITERATION} + 1"

which fails since ACTUAL_NODE then gets the value "1+1"

Can this be done in Buildforge, or do I have to create it outside of BF?

2 answers



permanent link
Rune Hellem (1122) | answered Jan 03 '11, 9:22 a.m.
Can this be done in Buildforge, or do I have to create it outside of BF?


After having looked through the documentation even more and also tried various ways on my own I have come to the conclusion that this can't be done in the BF console. Only thing possible to do is assign fixed values to variables, either by copying another variable value or maybe adding string values to that, but addition / subtraction and such cannot be done.

So I guess I instead must create a custom RAFW target which filters away certain node name patterns, in my case names containing odr (on demand router for WebSphere Extended Deployment), then calling the product target

permanent link
Robert haig (1.0k16) | answered Jan 04 '11, 3:10 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Can this be done in Buildforge, or do I have to create it outside of BF?


After having looked through the documentation even more and also tried various ways on my own I have come to the conclusion that this can't be done in the BF console. Only thing possible to do is assign fixed values to variables, either by copying another variable value or maybe adding string values to that, but addition / subtraction and such cannot be done.

So I guess I instead must create a custom RAFW target which filters away certain node name patterns, in my case names containing odr (on demand router for WebSphere Extended Deployment), then calling the product target

you can do shell math inside of a BF step. This syntax is not part of BF, but part of your favorite shell.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.