It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trigger a Deployment from a Remote Agent in a Custom Plugin Task

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.


1 answer

1 vote
Adam Slaski Atlassian Team Jul 18, 2017

I have two suggestions. You could have a look at the rest api, maybe the method 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 ? 

Adam Slaski Atlassian Team Jul 18, 2017

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. 


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 ? 

Adam Slaski Atlassian Team Jul 21, 2017

Hi Victor,
There is a plugin Pre-Post Build Command Runner ( 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: .

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:

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published yesterday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

61 views 0 9
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you