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

Deployment in a separate deployment project or as part of the build plan

mikayil-abdullah July 17, 2019

I've been practicing Bamboo for a while now and I've finally been able to deploy my first application on kubernetes.  I have two stages: The build stage and Deployment stage. The process goes like this:

Build stage

1. I check out the source code and build it with Maven.

2. With the help of some shell scripting, I preprocess the Docker file and some configuration files to later use it in the deployment stage. I also create some inject variables. This is important because depending on the git branch checked out, both application and kubernetes configuration files have different names and contents. This way I determine the config file names.

Deployment stage

1. I build the Docker image, push it to the repository (I do these two with the Docker build  and Docker push image tasks), 

2. And finally, again with shell scripting, I deploy the new Docker image to kubernetes cluster.

As you can see, I've been able to perform all the steps from checkout to deployment within a build plan. But there's also a feature called Deployment in Bamboo. My question is: Should I perform the deployment part in a separate deployment project? What will be the benefit? Currently, I see one drawback of using Deployment. I need to associate the project with a specific plan branch, which means I will need to have separate deployment projects for each plan branch.  But if I do it as part of the build plan, just one is sufficient. 

1 comment

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2019

Hi @mikayil-abdullah ,

When I setup out Bamboo environment we started by using deployment projects from the beginning.  One major advantage to them is that a single Deployment project can contain multiple environments.

SO you can build once, and deploy to a sandbox environment.  If you don't find any issues, you can then immediately deploy to QA/Staging/Pre-Prod (whatever your next environments happen to be) wihout having to run another build.

Here is the documentation on deployment projects which talks about some of the other reason you may want to use them: https://confluence.atlassian.com/bamboo/deployment-projects-338363438.html

I should also note that there is nothing wrong with what you are doing today, and you may find out after reading through the documentation that Deployment Project aren't right for your company based on the way you work, which is completely fine.

I hope that helps!

-James

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events