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.
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
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.