Do to the nature of our rather complex (and required) deployment pipeline, we want to simplfy things by adding a manual Stage containing a custom plugin that will Trigger related Deployment Project deploys.
To allow invocation on the Bamboo Server this can be implemented with a combination of DeploymentProjectService, EnvironmentTriggeringActionFactory, and NonBlockingPlanExecutionService.
However the problem that I encounter is that is will not work on Remote Agent because of the more limited access available on it.
As expected when I check the Remote Agent Logs I see that the plugin failured to load due to missing dependencies.
is waiting for unsatisfied dependencies [[&applicationProperties, &deploymentProjectService, &nonBlockingPlanExecutionService, &environmentTriggeringActionFactory]]
The question is how to I solve this for remote agents ?? .. It seems like RuntimeTaskDataProvider is only meant for getting Server Side data, how does one go about invoking something on the Server Side (from a Remote Agent) such as a deploy.
I have two suggestions. You could have a look at the rest api, maybe the method https://docs.atlassian.com/bamboo/REST/6.1.0/#d2e774 could be of some use. You could also have a look at "After successful stage" trigger on your deployment project.
If neither of my suggestions could solve your problem, please explain your use case so I can understand fully and provide more help.
I looked at both ..
1) I don't think "After succesful stage" will work as we do release branching (i.e. release-49, release-50, etc) , but the Trigger forces you to select one branch. I would want it to trigger for any branch (guarded by a manul step).
2) Looked at REST API , and have spiked it out ... Certainly doable, albeit a bit hacky ... But it would require that my plugin now has Username / Password to connect over REST to the Server.
I'm assuming there's no easy way to do this via pure Plugin ?
There is a plugin Pre-Post Build Command Runner (https://marketplace.atlassian.com/plugins/com.sysbliss.bamboo.plugins.prepost-build-command/server/overview) that can run a shell command on an agent or on a server.
This is not exactly what you asked for, but I hope you find it useful. In case you would like to extend that plugin, please find the source code repository here: https://bitbucket.org/atlassian/bamboo-prepostcommand-plugin .
Adding solution for anyone thats interested.
We ended up just scripting the deploy using Gradle + Bamboo API Calls.
We created a seperate Release Pipeline Plan , with different Manual Stages for different environments.
Snippet is available at:
I'm John Allspaw, co-founder of Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...
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
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs