Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Best way to share variables between projects and libraries?

Actually the subject would be: Best way to share variables between projects and libraries? 4-inline-level calls

Lets say I have a project and 3 libraries. I need to make the following execution:

Project --> Lib A --> Lib B --> Lib C

*each "-->" represents a .runwait command in a step.

The goal is that after Lib C finish its execution and updates the variable's value, Lib B can use the updated variable, then Lib A, and finally the original caller (Project).

Right now I have to declare a variable in an environment, link every step to that environment (to have the updated value), and then edit every variable using the .set command. I would like something like .bset were I can declare variables whitout creating them, but that doesn't work (I can't see the value from Lib B)

What would be the best approach to implement this in BuildForge?

Thanks!

0 votes



3 answers

Permanent link
Actually the subject would be: Best way to share variables between projects and libraries? 4-inline-level calls

Lets say I have a project and 3 libraries. I need to make the following execution:

Project --> Lib A --> Lib B --> Lib C

*each "-->" represents a .runwait command in a step.

The goal is that after Lib C finish its execution and updates the variable's value, Lib B can use the updated variable, then Lib A, and finally the original caller (Project).

Right now I have to declare a variable in an environment, link every step to that environment (to have the updated value), and then edit every variable using the .set command. I would like something like .bset were I can declare variables whitout creating them, but that doesn't work (I can't see the value from Lib B)

What would be the best approach to implement this in BuildForge?

Thanks!


have you considered inlines instead of chains? (.runwait's are functionally chains)
Using inlines, you could use .bset as you describe.

Also, you shouldn't have to link every step to your env. A step inherits it's builds environment. You could set the env at the library or project level.

0 votes


Permanent link
have you considered inlines instead of chains? (.runwait's are functionally chains)
Using inlines, you could use .bset as you describe.

Also, you shouldn't have to link every step to your env. A step inherits it's builds environment. You could set the env at the library or project level.


Thanks Robert! Now I've only linked the env at a project/library level and it works as well.

The problem with inline instead of .runwait is that I need the libraries to run "at the middle" of my steps. Having that in mind, is there any other implementation I can do? (I can't split the step since I would have more than 60 and that would be a nightmare!)

0 votes


Permanent link
have you considered inlines instead of chains? (.runwait's are functionally chains)
Using inlines, you could use .bset as you describe.

Also, you shouldn't have to link every step to your env. A step inherits it's builds environment. You could set the env at the library or project level.


Thanks Robert! Now I've only linked the env at a project/library level and it works as well.

The problem with inline instead of .runwait is that I need the libraries to run "at the middle" of my steps. Having that in mind, is there any other implementation I can do? (I can't split the step since I would have more than 60 and that would be a nightmare!)

best practice is to have a step do a single thing (even if that single thing is spawn an inline). It sounds like you should split your steps. (sorry to say)

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 01 '11, 3:28 p.m.

Question was seen: 4,976 times

Last updated: Mar 01 '11, 3:28 p.m.

Confirmation Cancel Confirm