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.
See:
However the problem that I encounter is that is will not work on Remote Agent because of the more limited access available on it.
See:
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.
Thanks
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.
Thanks Adam,
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it would require that my plugin now has Username / Password to connect over REST to the Server.
For sure, you can keep password in a global variable. Just make sure to include the string "password" in the variable name so that it would be masked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Adam,
I think that's the solution that i'll be taking ..
For future reference, is there a way to have a Build Task run actions on the Server (not via Rest). Some kind of PostBuild Task, etc ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Victor,
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 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
https://gist.github.com/vicsz/b04c31f27a91b0d32b55b1bf718ab705
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.