Ask a Developer: What are the benefits of using CI/CD?

developer

Welcome to a new BetaKit bi-weekly series designed to help startup developers. Each article, TribalScale’s tech honchos tackle the tough questions facing devs today. Have a question you would like answered? Tweet them with the #askadeveloper hashtag, or email them here.


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

Productive developers are happy developers, and happy developers produce better product.
 

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 made available to users, and yet again 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 commit the code into the repository. Most likely, this cycle takes place multiple times a day.

ask a developer
Click to enlarge.

To produce a deliverable, the entire codebase is compiled manually and locally on their computer, meaning there is a lot of room for error. The process is also tedious, can take up a significant amount of time, and isn’t a scalable option. 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

If you’re a product owner…

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.

Do 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. But rest assured, many CI/CD services are free (Travis CI and Concourse CI), and the initial pipeline setup is usually fairly straightforward.

coding

For developers…

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 in the development cycle. You will know whether something went wrong well before deployment, and you will have ample time to make the changes to clean your code. 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 validation 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 immense 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 you will reap major long-term rewards.

Get in the groove

Continuous integration and deployment are part of the 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.

Photo via Unsplash

Avatar

Andrew Leung

Andrew Leung is the Director of Engineering at TribalScale. Andrew has over ten years of experience in software development and has worked with stellar teams around the world.

0 replies on “Ask a Developer: What are the benefits of using CI/CD?”