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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Can I easily change build agent assigned across and entire project in bamboo.

Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 06, 2020

Going to be switching to newer build servers and want to be able to setup the new machine, and bamboo build agents then assign every build thats done on machine1 to machine2.


I am using a custom key like agent name ='machine name" so it would be a bulk change of agent name,etc.



1 answer

1 vote
Gerhard Forster
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 13, 2020

Hello there.

Thanks for your question that might also be interesting for other Bamboo users.

Let me start with a general overview of Bamboo's agent assignment options.

Dynamic assignment works via setting an agent capability and specifying the appropriate reqirement in a build plan's job. Effectively a requirement can be regarded as a must-have capability of a build plan on job level. If both match for one agent, that agent can be selected by Bamboo Server to run that build's job.

Find this process outlined in the following KB: 

Alternetively, Bamboo offers the option to explicitly dedicating an agent, be it local, remote or even elastic, to a build project, plan or job. This represents a fixed assignment. Find the below KB as a great reference for doing so. 

Clearly, you can combine both strategies so to permit best and most flexible usage of your agent pool for your build plans, jobs and tasks. That said, when adding new agents which are supposed to run builds, you can utilize the above simply via Bamboo's UI.

Now we understand that you'd like to automatize agent switching from old to new agents. One sleek way of doing so using Bamboo UI might be the following:

  1. Add each of your new agents to Bamboo so that it's visible for a Bamboo Admin under Cog >> Overview >> Agents
  2. On the "Agents" page, click on one of these new agents and on the appearing Agent summary >> <agent name> page, define e.g one or more "Agent-specific" or a "Shared" custom capabilities. Each of these are actually key-value pairs. For example, you may want to create key "agent_selector" and set it a a value like "LinuxAgent10". You might want to add others charaterizing your agent such as "performance_key" with a set of values, and more.
  3. Repeat the above for all your new agents, setting capabilities as needed.
  4. When done, navigate to your build plan(s), under Plan configuration select the wished job(s) and there get on tab "Requirements". Use any of the previously set custom capabilities with "exists", "equals" or "matches" and possibly combine those with other capability types existing for the new agents, like Exceutables, Git or other SVCs, Docker, etc.

The above approach should help you replace old by new agents with little effort.

With regards to "configuration per code", you may consider defining requirements for a build plan's job or task within its Bamboo Java or YAML Specs. Find this illustrated, also per examples, in section "Requirements" of KB 

Besides, Bamboo's REST API allows to dedicate a build project, plan or job to an agent per the following endpoint


using the POST method. The DELETE method may be used to remove a dedication and per GET you can query for existing ones.
For deployment environments exist basically the same, though using two different REST endpoints for that.

Please find all REST details in our 

Hope this helps. Please let us know if there is more that we can assist you on.

Thanks and cheers.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events