Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

About Bitbucket pipeline and bamboo deployment

Zeus OdeAl April 10, 2019

Hello,

I'm using a bitbucket and bamboo.

I have pipeline configuration files in my Bitbucket branchs. The pipeline runs automatically when I push with git.

I have a simple ssh task on bamboo. When Branch detects a new change, it goes to the server and deployment. I'm doing this with the "after successful build plan" trigger.

I'm not having any problems, except for one subject.

My problem is;

whenever I make a change to the branch, bamboo detects a change and runs the deployment task before the pipeline runs out. Actually, it's something I want. But once pipeline is finished, Bambo deployment needs to start working.

I'm trying this with the "Scheduled" trigger and I set it up every 3 minutes. But this is a workaround solution. Sometimes when the pipeline is running, it overlaps with scheduled. I'm open to your suggestions to make this process healthier.

When I push to something new into the branch, I want to run the pipeline and finish it, then bamboo can get it and start deployment.

Any suggestions for a solution ?

2 answers

2 accepted

2 votes
Answer accepted
Rafael Pinto Sperafico
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2019

Hi @Zeus OdeAl ,

When I push to something new into the branch, I want to:

  1. run the pipeline and finish it, then
  2. bamboo can get it and start deployment.

As @vi mentioned, you could be using Bamboo's REST API to trigger a build in Bamboo upon Pipeline completion. And once the build completes, a Deployment could be automatically triggered (as you are doing already through the "After successful build plan" trigger).

You should remove the Trigger option you have added to your PROJ-PLAN in Bamboo, as this would prevent build(s) from getting triggered once a commit to the repository is made. And only run a build using https://docs.atlassian.com/atlassian-bamboo/REST/6.8.1/#d2e2162

/queue/{projectKey}-{buildKey}?stage&executeAllStages&customRevision

Kind regards,
Rafael

Zeus OdeAl April 15, 2019

Hello,

Thank you for your support. I can fix the problem by using Rest api.

0 votes
Answer accepted
Victor Debone
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2019

Hello @Zeus OdeAl welcome to the community 🎉

Have you tried to trigger the deployment with the REST API? You can use this endpoint and trigger it from the pipeline.

Would that work for you?

Victor

Zeus OdeAl April 15, 2019

I've been successful in my tests. Now I'm writing my scripts with the rest api.

Like • Victor Debone likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Bitbucket Events