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

BuildForge, how to set different values in each thread?

My purpose is like this: based on a variable, I want to run an Inline library (has two steps) on the target servers. If the variable is "y,y,n,n", I want the library runs on server1 and server2.

I created the project as follows, each "Run on * Server" includes the inline library. I tried to run the .bset selector both in the thread step or inside the inline, seems the server value is overwritten each other in threads. How can I make sure each thread is running on the right server?

P.S. the .bset env "APP_BANNER=n,y,n,n" is to reset the value to enable K only. The original value is "y,y,h,h", means need to run the library on H and K server.

0 votes


Accepted answer

Permanent link
The .bset selector will affect the entire build.  So the current configuration will create a race condition between the steps.  If you want to set it differently you would need to chain the project to make sure each thread project then gets its own stack.

But I would still say that a broadcast step with a selector tailored to the pool of servers you want to run the steps on would be the easier cleaner solution.

~Spencer
Jirong Hu selected this answer as the correct answer

0 votes

Comments

Will change to .tset resolve the problem? The doc says the inline project steps will all be run inside the same command property of the calling project.


The doc says the following for inline project:


When the step runs, the following happens:
  1. The step runs the command or commands in the Command property.
  2. The step runs the steps of the project or library that is specified in the Inline property.

 How to chain the projects in my case?

 The chained project works. Now I am going to try the broadcast solution you've told me in another post. Thanks a lot!

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
× 12,023
× 3

Question asked: Jun 30 '15, 3:44 p.m.

Question was seen: 2,765 times

Last updated: Jul 01 '15, 6:55 p.m.

Confirmation Cancel Confirm