Continuous integration (CI) and continuous deployment (CD) are second nature practices to some developers. However, there are still many who aren’t implementing CI/CD in their development cadence. If you’re already practicing, this is a helpful reminder of its many benefits. If you’re trying to get your team on board, we’ve done the work for you. If you haven’t implemented CI/CD into your cycle, here is why you better start.
Continuous integration is the process of automatically integrating code into your product. Code (potentially from a variety of sources) is integrated into a central repository for testing and building. Once the developers have committed their code changes to a central repository, CI will run your tests automatically every single time, giving you constant feedback on whether the code is working as intended.
Continuous deployment or continuous delivery is the process that allows your product to be released faster and frequently. The code changes are delivered in shorter cycles and are made available to users, and provide more frequent feedback!
How does CI/CD fit into the workcycle?
Let’s imagine a developer that doesn’t practice CI/CD…
They run through their deployment cycle: pick the story to work on, code it, possibly write a unit test, run the test, ensure the code passes on their local computer, complete the story, and then commit the code into the repository. Most likely, this cycle takes place multiple times a day.
To produce a deliverable, the entire codebase is compiled manually and locally on their computer. This creates a lot of room for error. The process is also tedious, can take up a significant amount of time, and isn’t scalable. This method requires intricate computer settings, and only the developers on that project will be familiar with the particular setup. So, if there is a new team member, they will need to mimic and understand the environment in order to produce the same output. And setting up a new development environment, learning the processes, and contributing code can take days.
CI and CD automate this process. With CI/CD, the team will have a standard, shared environment, team members can continuously integrate code changes, and incrementally build on the product. In the end, the output is shared. Have a new team member? They can jump right in, and deploy on their first day by relying on the CI/CD pipeline.
Benefits and Advantages
1. If you’re a product owner or manager:
You want your developers to integrate CI and CD into their practice because you will get results, and you will get them often. Deployments are ongoing, so you will be able to track the project and provide feedback at each stage, seek realignment, and adjust with the team as needed. In the end, because of regular review and oversight, you will feel even more confident in your product, especially as it gets closer to the end-users.
2. If you have a developer team:
You want your teams practicing CI/CD. One, with much of the process automated, development is streamlined and developers will be more productive because they won’t have to worry about the more tedious and mundane tasks. Two, the delivery cycle is shortened, so your teams will be producing and releasing that much faster. Three, onboarding and scaling for growth are much smoother with CI and CD.
With improvements and increased output on the table, it just makes sense to integrate CI and CD. Plus, many CI/CD services are free (Travis CI and Concourse CI) and the initial pipeline setup is usually fairly straightforward.
3. If you’re a developer:
Not only will your output increase, but your quality of life will improve. With much of the development cycle automated, you will be more efficient, and you won’t have to worry about the little things. You can focus on doing what you love doing: writing the best code possible.
The CI pipeline also provides feedback early and frequently. You will know whether something went wrong well before deployment and you will have time to make the needed changes. By the time the product is with the user, you can be sure that the code is strong. Another major benefit of fast feedback is that you will be able to iterate rapidly, make small changes, and see your efforts through deployment. There is nothing more gratifying than seeing the fruits of your labour. Finally, CI provides you with additional support and the validates that you are producing quality product. Don’t be afraid to push yourself and your work, let people see what you can do.
Getting started with continuous integration and deployment
As discussed, CI and CD will bring many benefits to your development cycle, there is really no good reason not to do it. Since many services are free, and with readily available cloud-based options (Circle CI and Travis CI) building and releasing quality software is easy.
I suggest you set up your pipeline before a single line of code is written. From the get-go, all code will be centrally integrated, tested, and deployed. Having the CI/CD pipeline defined and implemented from the beginning will save time in the future and will reap major long-term rewards.
Get in the groove
Continuous integration and deployment are part of Agile DNA: lean teams, constant iteration, rapid feedback, and growth are symbiotic with CI/CD. However, CI and CD do more than add business value. The benefits are numerous and apply to all stakeholders: product owners, developer teams, end-users, etc…
As mentioned, automating the tedious and dry tasks will enhance developer productivity and developers will produce better work faster. Then, developers can focus their energy on what they love and know how to do best. Personally, I know there is nothing better than getting in the groove, zoning-in, and writing some pretty stellar code with confidence. CI and CD let me and my teams leverage our potential and develop the best products possible.
*A version of this article was initially published by BetaKit.
Andrew Leung is the Director of Engineering at TribalScale — a global innovation firm that delivers first-in-class product strategy, design, and development for mobile, web, and emerging technologies. Andrew has over ten years of experience in software development and has worked with stellar teams around the world.