What Is CI/CD and Why You Should Be Using It

Spinnaker Summit
Jul 17, 2018 · 4 min read
Image credit: Pixabay.com

It’s common to see the buzzwords Continuous Integration (CI) and Continuous Delivery (CD) thrown around almost interchangeably, but they’re not quite the same thing.

While both are critical to smooth-running deployments, it’s important to be clear on the differences between them. Only then will you be able to fully understand the benefits and also make sure you know which one your team is actually doing (or needs to adopt).

What is Continuous Integration (CI)?

In a nutshell, CI is a development practice where developers merge their changes back into the main branch after each small task is complete (preferably on a daily basis). Once their code is in the mainline, an automated build then runs tests on the new commit to make sure it won’t break existing code.

To clarify why this is a big deal, consider what normally happens in traditional software development. A few developers will keep local changes because “it’s not ready yet”, while others create another branch so they can work on their own tasks without being troubled by other people’s code.

In both scenarios, problems are bound to happen after the final merge. It’s a bit like designing a car and giving each car part to a different person to work on independently, then waiting until the very last day to put the car together for testing. You’ll likely end up with a Picasso on wheels that’s brimming with issues.

Circling back to software, CI ultimately avoids untested code from merging into the main branch so teams aren’t left scrambling to fix a huge, bug-ridden mess right before release.

When to use CI?

To implement CI, you’ll have to pick a CI tool — known as build servers — like Jenkins, TeamCity, Travis CI, GitLab, Codeship, etc. Picking the right tool depends majorly on your requirements and techstack.

But when do you use CI in the first place? Basically, when you want to achieve any of the following:

  • Notify developers of issues in their code sooner rather than later.

What is Continuous Delivery (CD)?

CD is a methodology that ensures every software change is automatically built, tested, and ready to be safely deployed to production. It’s widely described as the “next step” after CI.

The main goal of CD is to reduce friction in the deployment process by automating the steps needed to fully test the code and leave it ready to be released at the push of a button. (Which relieves the developers from a lot of manual, repetitive work.)

Amazon zeroes in on the main difference between CI and CD by saying:

“Continuous integration is focused on automatically building and testing code, as compared to continuous delivery, which automates the entire software release process up to production.”

Pro tip: Continuous Delivery also tends to get mixed up with Continuous Deployment. The former involves a person/test/business rule that decides when the final push to production occurs, whereas the latter pushes changes automatically.

When to use CD?

Honestly, any organization that wants to release code faster, safer and more reliably should consider practicing CD. Popular CD tools include Ansible, Chef, Bamboo, Codenvy and many others. If multiple cloud deployments are in the picture, then open source Spinnaker is your best bet.

Here are a few more reasons why you should adopt a CD workflow:

  • Simplify the complexities of deployment so they’re no longer the bottleneck of each release cycle.

Getting to know more about software delivery

Simply put: Businesses wanting to stay ahead of the curve need to adopt CI/CD. Furthermore, developers looking to grow their career need a strong foundation in both, since modern tech companies rely heavily on CD and have even built their team culture around it.

As a useful side note, if you’re in the business of developing, releasing, and managing software; you won’t want to miss the annual Spinnaker Summit.

The Spinnaker summit is a large-scale meetup in Seattle this October where the best developers, architects, delivery managers, and tech leaders will be giving keynotes, workshops, and their business cards. Register here and stay in the know by following Spinnaker on Twitter!

Follow us on Medium for more posts on CI/CD and open source software. Don’t forget to clap!

Spinnaker Summit

Written by

Focused on the open source platform as a key enterprise choice for software delivery + management // Join us October 8–9, 2018 // spinnakersummit.com