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.
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:
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.
I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...
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