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?
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..
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.
G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...
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