The relationship between build plans and agents can be managed through capabilities and fine tuned using custom capabilities. These features don't seem to exist for deployment plans.
We have Linux and Windows based agents for building. However, for deployment we want to only use the Linux based agents. How can we prevent deployment plans to run on the Windows based agents? And no - dedicating agents just to deployment plans is not feasible. The Linux agents must stay available for running build plans.
You should be able to define a capability - a custom executable that exists only on the linux agents. This can be as simple as a shell script that does nothing. Just make sure that it exists in the same path and is executable (which may or may not truly be necessary but seems like it would throw an error if the script wasn't executable). I have a batch file on my local agents that prints the current date to the screen to restrict the build to a local agent (deployment plans should not be any different as you just insert a new task that uses the shell script). If the shell script exists on the server it will be available as meeting the requirements of the deployment plan. You'll need to add it into each stage though. A stage will revert to the next available agent even if the first stage is restricted via capabilities.
If I may jump in...I would say this isn't a scalable solution, especially when you have over 100 deployment projects with multiple environments in each.
In our case, all of our agents are linux servers, with the exception of a mac mini that is designated for ios builds. I've been trying to figure out how to make sure deployments aren't run from the mac mini. Adding a dummy executable task to all of our deployment projects would be a headache. Is there any talk about adding the capability to exclude specific agents from being used as deployment servers?
I fully agree with your sentiments. The problem as I see it is that Deployment Plans are currrently gimped versions of Build Plans and lack some of the important features of Build Plans like stages and jobs and custom capabilities. For example for us a full deployment means updating a mix of environments (Windows and Linux) but a Deployment Plan can't deliver that as it has no stages that can run on different agents depending on capabilities. Build Plans can do that but Deployment Plans can't. I have no idea why Atlassian didn't make the full power of Build Plans available for Deployment Plans as obviously the infrastructure is already in place.
Actually, I just tried what Gretchen suggested and it still doesn't work.
@ Manuel - were you able to get the workaround to work as mentioned by Gretchen?
Here's what I did:
1) Added new executable capability (points to a dummy script) to the agents I want deployments to run on.
2) Added a Command task to a deployment project stage to run the newly-defined custom executable.
...and Bamboo is still showing all agents as capable of running the deployment. Hm...? I've confirmed the one agent I don't want deployments running on doesn't have the executable capability. I've also run the deployment just to see if it uses the excluded agent, and it did after a couple runs.
@Gretchen, am I missing something?
Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot