Bamboo’s biggest strength lies in its ability to give developers control over their entire workflow – all the way from testing to production. With Bamboo, those difficult tasks, such as releasing or deploying software, are easy to automate using a practice called Continuous Delivery.
Continuous Delivery is the process whereby all the steps from code building to deployment are completely automated. Before Continuous Delivery, releasing software was traditionally an infrequent and manual process, prone to errors. But with the time saved by automating steps, you and your team can work on your project’s important deliverables and stop the boring and repetitive tasks that come with shipping your software.
What’s a Stage?
Stages are individual sequential steps within the build. Stages make it easier to break down your build automation into multiple steps such as compilation, testing, and deployment. When a Stage executes, all of the Jobs that belong to the Stage start building, parallelizing your build and greatly reducing its execution time. A Job in Bamboo runs a bunch of Tasks that define the behaviour for your build. Tasks can run scripts, Maven goals, build Visual Studio projects, and much more.
Jobs can be used to split up a suite of tests into smaller batches, with each Job executing a separate batch in parallel. Splitting up integration tests can easily save hours. Jobs in the following stages will not begin executing until all the Jobs in the previous Stage successfully complete. This feature ensures that expensive integration tests only run after cheap unit tests pass, for example.
Ready… set… ship!
In the image above, we have defined three stages – Build, Test, and Deployment. When a developer commits to the Git repository that holds our source code, the Build stage and its single Compile Job execute.
If the project compiles correctly, the build moves to the Test Stage. Now, here’s where things get really cool – instead of running all of our tests in a single Job on a single machine, we granulate our tests into multiple Jobs. When Bamboo starts executing the Test Stage, it queues all of the Jobs in the Stage at once. If enough free Remote Agents are available, each Job should get executed in parallel at the same time. In our example, this Stage takes approximately 20 minutes to run instead of the hour it would have taken if we had combined all the tests into a single Job. Parallelizing Jobs is a really easy and quick way to get feedback super fast.
Since we don’t want to upload a release to our website on every commit, we have set the Deployment stage to be a manual one. When Bamboo gets to a Manual Stage, execution stops and waits for a manual trigger in order to start building again. In our example, the build stops when it gets to the Deployment Stage, and someone will need to click on the Continue button to continue the build when they wish to release.
In the image above, the history of the last 10 builds of a project are shown, of which only 8 of them are release candidates. Your team can keep committing changes and have Bamboo run through the tests, all with the knowledge that Bamboo will have a working release ready when you decide to pull a Captain Picard and “Make it so!”
- Install Bamboo and create your first Plan. Its super easy to get started and we have a step-by-step video that shows you how todo this.
- Take a look at how to create and configure a Stage to build your Continuous Delivery workflow with Manual Stages
- Use Bamboo Artifact Sharing to pass files between Stages, such as web apps, executables and resources needed for testing and deployment.
- Want faster feedback like how we did it in this example? Install Bamboo Remote Agents to increase your servers capacity to build Jobs
- Got questions? We can help answer them at Atlassian’s very own Q&A site, Atlassian Answers.