Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to synchronize two remote agents?

We have two remote agents (running on different VMs). These two agents run some plans that check-in to a common git repository as the last step. Sometimes they conflict because of this.

Question: how to enable these plans to run "mutually exclusive"? or how to make one plan waiting for another to complete?

1 answer

1 accepted

0 votes
Answer accepted

Hi @pinebit,

The easiest way I see you could implement this is by serializing the work in the same remote agent (as you said you run the build plans on different machines and you probably have a reason for that). Bamboo does not have a feature like a mutex to mutually exclude plans, stages or jobs that share the same resource.

It is important o remember that we can run parts of the same build in multiple agents. I'm wondering if you could set the concurrent part of your build in a special job and make only this job to run on a dedicated agent. Using this approach both plans would use the same job to run the commits and therefore never clash.

More details on how to dedicate an agent can be found here: 

There is also a pretty old feature request on this matter that didn't get much traction along the years. If you want this to be implemented, please vote on it and share your thoughts there.

I hope that helps you to move forward on this.

Thank you Daniel for the prompt answer!

To make it little more clear: the two agents I mentioned are OSX and Windows based and their build some desktop application targeting these platforms. The build result, let's say executable files, are pushed then to a shared git repository which is connected to our SW update server. And this last stage of the plan - pulling from and commiting to the git repository is the conflicting thing, if two plans are happen to run on these agents concurrently.

If we move that last stage (pull+commit) to another agent, then we will need to collect build artifacts from OSX and Windows agents and feed them to that new job, somehow..

Hey @pinebit

Thank you for explaining the scenario better.
Yes, that is the idea, you will need a special stage and job for this. The stage will allow you to have all the artifacts from prior jobs ready to be downloaded into the new job. I didn't mention the stage part (my bad) because the job will be the building block assigned to an agent, but thanks to your last comment I have the opportunity to clarify this.

Please let me know if this is still foggy and you need more details.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

588 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you