It's all about the answers!

Ask a question

set variables


shiran shem tov (1211114) | asked May 04 '10, 7:52 a.m.
There is way to set variable per library?

I want to set a variable with the same name in 2 different libraries, but i want the variable will be local to the library and don't effect others libraries.

the .tset is an option but it will be per step inside the library no? i need it to work on 2 steps

4 answers



permanent link
Brent Ulbricht (2.5k11) | answered May 04 '10, 9:16 a.m.
JAZZ DEVELOPER
There is way to set variable per library?

I want to set a variable with the same name in 2 different libraries, but i want the variable will be local to the library and don't effect others libraries.

the .tset is an option but it will be per step inside the library no? i need it to work on 2 steps


It sounds like .tset might work for you if the structure of your project allows for making subsequent steps that need that variable as inlines. The .tset command takes effect for all commands in the step and for any Inline specified for the step. It will not permanently change the variable value for the environment (that would be a .set) or for the build environment (that would be a .bset).

permanent link
shiran shem tov (1211114) | answered May 04 '10, 9:43 a.m.
There is way to set variable per library?

I want to set a variable with the same name in 2 different libraries, but i want the variable will be local to the library and don't effect others libraries.

the .tset is an option but it will be per step inside the library no? i need it to work on 2 steps


It sounds like .tset might work for you if the structure of your project allows for making subsequent steps that need that variable as inlines. The .tset command takes effect for all commands in the step and for any Inline specified for the step. It will not permanently change the variable value for the environment (that would be a .set) or for the build environment (that would be a .bset).

if i do .set in the first step and in the second step i ask with condition if there is a value in the variable it will work? the value will be saved for the second step?

permanent link
Brent Ulbricht (2.5k11) | answered May 04 '10, 11:32 a.m.
JAZZ DEVELOPER
if i do .set in the first step and in the second step i ask with condition if there is a value in the variable it will work? the value will be saved for the second step?


The .set command changes the master record for an environment. Therefore, if you use .set to change an environment variable value in the first step, you will need to explicitly set that same environment on the second step that you would like to see the new value. Otherwise, your second step will pick up the variable value that was in effect on the environment when you started the build. The value you set with the .set will persist in the environment after the build has completed.

permanent link
Jonas Gryder (11663) | answered Sep 08 '10, 3:20 p.m.
.bset will do what you have described: Here is the summary of what the command do:
.tset: set variable for the current step only
.bset set variable for all following steps in the current job only
.set set variable in the master environment. Applies to future runs of the project only

There is way to set variable per library?

I want to set a variable with the same name in 2 different libraries, but i want the variable will be local to the library and don't effect others libraries.

the .tset is an option but it will be per step inside the library no? i need it to work on 2 steps


It sounds like .tset might work for you if the structure of your project allows for making subsequent steps that need that variable as inlines. The .tset command takes effect for all commands in the step and for any Inline specified for the step. It will not permanently change the variable value for the environment (that would be a .set) or for the build environment (that would be a .bset).

if i do .set in the first step and in the second step i ask with condition if there is a value in the variable it will work? the value will be saved for the second step?

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.