We’ve been talking about continuous deployment here on the Atlassian Dev Tools blog. Many of you are already sold on the idea, and some of you are putting it into practice already. But others may be reading these posts thinking “Continuous deployment sounds wonderful, but my hurdles are so many and so high, I wouldn’t even know how to start!”
Sound familiar? If so, read on into our two part blog series about breaking into Continuous Deployment one step at a time. The first blog will show you ways to evolve your build process to include more and more automation and the second will give you some tips and tricks to continuous deployment stardom.
Manual Stages Let You Build a Continuous Deploy Framework
Any Plan in Bamboo can include one or more manual Stages. Each build of the Plan pauses when it encounters a manual Stage, and resumes at the click of a button when your team is ready to proceed.
In the context of moving toward a continuous deploy model, manual Stages can serve as placeholders. A roadmap, if you will. Bake them into your Plan now, then update their configurations one by one as you automate each piece of your pipeline.
Why bother setting up a Plan where some steps are performed manually?
- Accountability: each progression through a manual Stage amounts to a sign-off on it’s success
- Traceability: see at a glance what build number was last pushed to each environment and what code changes were included
Release Management: when Bamboo is linked to Jira, marking a version as shipped and executing the release itself happens with just a few clicks
- Communication: build result summaries let everyone see exactly where in the pipeline a build is at, decreasing email & IM traffic
- Repeatability: tasks that are automated can be reliably repeated, whereas manual tasks carry the risk of human error
- Adaptability: you now have a template for replacing manual steps with automation
Let’s dig deeper into that last point. It’s the best part!
Combine Manual Steps and Automated Steps
Imagine a project with a build server that automatically compiles the code, runs unit tests, and packages it up. Deployments to QA and Production are performed manually. Tests against those environments are a mixture of manual and automated. Let’s see how artifact sharing and Bamboo’s unique concept of Stages can be combined in a Plan that reflects the current process, and evolves as manual steps become automated.
Here is our imaginary project’s build process, represented as a single Plan in Bamboo.
- Build launches automatically with each commit. At this point, the Plan will fast-fail if, for example, there is a compilation error. Otherwise, if the Stage completes successfully, the Plan’s execution will simply pause. In order for downstream Jobs (like deploys) to utilize the packaged build, you must tell Bamboo to share the build artifact. More on that in part 2 of this mini-series!
- Deploy to QA is a manual Stage. The deploy engineer will use Bamboo to find the most recent successful build and it’s artifact. After deploying, they will come back to the Plan and press the Continue button to indicate the step is complete. Note that you need to include a “dummy” Job in your manual Stages when using them in this way. In this example Plan, all the Jobs for manual Stages run a one-line script that echoes “hello world”.
- Auto Tests on QA is triggered by the completion of the previous Stage. Its two Jobs will run in parallel if two Agents are available. Otherwise, they will run sequentially.
- Manual Tests on QA will pause the build again, assuming the automated tests succeeded. This is a signal for the manual testers to begin their work. Once testing is complete, the QA team comes to the Plan and signs off on the manual testing –again, using the Continue button.
- Deploy to Production is where most builds of the Plan will end, until the team feels confident pushing new code with each build. In the meantime, everyone on the project knows that the builds that reach this Stage could go live without introducing any new defects. When it is time for the production push, the deploy engineer will again pull up the appropriate build in Bamboo to find the artifact, manually deploy it, then sign off on that Stage by clicking Continue.
- Auto Smoke-Tests on Production will then kick off automatically, completing the final step in the process
Evolution is the Solution!
By gradually progressing along the continuous deploy spectrum in this way, you march steadily toward your objective while avoiding ghastly organizational upheaval in its pursuit. It’s the same as how you eat an elephant, my friends: one bite at a time.
Stay tuned for part two of our blogs series that will shed some light on the tips, tricks and gotcha’s to make your process sing. Subscribe to the to the Dev Tools blog or check back shortly for the second post to this series.
In the meantime, share your manual-to-auto transition story by posting to comments. You might just inspire someone!
New to Bamboo?
Download a free 30-day trial of Bamboo to get your automation process started.
[UPDATE: Click here for part 2!]