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

How to trigger a project deployment on success of another one ? Does that make sense ?

Hi guys,

With Bamboo OnDemand, I want to chain project deployements, each one being triggered when previous one has succeeded, like QA => Stage => Production.

How do I perform that, knowing the only triggers available are on plan build success, not on project deployment success ??

Maybe my question does not make sense, or maybe it looks stupid, so let me describe you more about my project context :

It is a PHP project, so basically, at the beginning what I expected from Bamboo OnDemand is to :

1 - check out the code from one branch (in BitBucket)

2 - do some PHPUnit test on it on the Elastic Image

3 - deploying the code to one environment

and to redo this "3 - steps" for another environement, and maybe another git branch.

Let's say 3 environments is enough for me (testing/QA, Stage, Prod). And of course I want a chain, each one triggering the next, only if it went well (except for the prod I want to be triggeredmanually)

Problem 1.

I cannot run PHPUnit in Elastic Agent because it seems it does not have the mysql driver .... So far for the automated testing in Bamboo OnDemand.

Solution : I can do the testing on the target server, once the code has been "deployed".

So it means my 1-2-3 steps become :

1 - check out the code from one branch

2 - deploying the code to one environment

3 - do some PHPUnit test on it

Problem 2.

I don't have any resulting artifact, since I don't have to "build" (meaning compile/ link etc.) anything, I'm in php world... I just have source files to be "deployed" (=moved) from the repo to the server.

As an unexpected consequence, it means that if I want to use Project Deployments, I have to create a fake and shared artifact, otherwise I can't create any project deployment ! :(

Moreover, to perform the "deployment", I don't want to use any SCP task that actually move all checked out files over the net, it would be way too long.

Solution : my deployment will only consist in remotely asking for a git pull.

Finally, what I have now is :

(1) A build plan whose sole role is to create a dummy file to be shared as an "artifact", just to allow me have Project Deployments.

(2) One project deployement for QA env., which have only one task, the SSH command task, that connects to the QA server and performs remotely :

  • git pull from the "develop" branch to the web root (I'm using Bitbucket and a Gitflow workflow here)
  • run local phpunit testing against that code

Then, if testing is OK, I want to do the same for a Stage environment. But how to chain/trigger it ?

And eventually I want to do the same for a Production environment, expect this one will be manually triggered (and source code will be pull from Master branch).

Can you help me to organize this ? :)

best regards,


4 answers

Hi, I think your question makes sense. Here is my similar scenario: I'm also working on a PHP project, I'm also deploying my code with git. I have following environments: ci (automated testing), test (manual testing), staging and production. My goal is to have: 1. automated deployment on ci 2. automated test cases to be executed against ci 3. if automated cases pass, then automated deployment on test 4. manual execution beyond this point Currently I'm achieving this by deploying on ci during the build phase. This enables me to have conditional triggering of the test deployment. However, this is not a perfect solution: 1. It wouldn't work if I wanted to have more deployments chained, unless I put them all in the build phase. 2. I don't have a release number generated at the build phase, so I have to use another common piece of information (e.g. revision), which I don't like. So again, yes, your question makes so much seance and I really see no reason to have this implemented in Bamboo. Regards, Valentin

P.S. I found following improvement cases in Atlassian's JIRA. I hope by more people voting for them, they may soon be implemented:

Thanks for your answer Valentin ! 

I've added my vote to these issues :smile:

0 votes

The feature is under development and is most probably going to be included in 5.8 release.

excellent news ! does it include Bamboo OnDemand ?

yes, it does

thanks :) looking forward to seeing that !

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Next-gen

Keyboard shortcuts have arrived for next-gen projects!

...ollected feedback from users around the lack of shortcuts, and we’re here to address that: In next-gen projects, I miss the keyboard shortcuts badly. This is particularly true on the Board, but also i...

146 views 0 2
Read article

Community Events

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

Events near you