Product
|
Cloud costs
|
released
January 21, 2021
|
3
min read
|

What is CI/CD? Everything You Need To Know

Updated

Code doesn't exist to live in a silo. Our software services are meant to be valuable, understood, and shared. And so, the business of software delivery is to release our software out to users and consumers. Continuous Integration and Continuous Delivery (CI/CD) provide organizations with the capabilities to deliver software changes of all kinds to users consistently. This blog post will share everything you need to know about CI/CD, from code changes to continuous integration, continuous delivery, deployments, and CI/CD pipelines.

What Is CI/CD?

CI/CD is a shortened term for Continuous Integration and Continuous Delivery. CI/CD is the combination of principles, practices, and capabilities that allow for software changes of all kinds to get users in a quick, repeatable, and safe manner. This allows for software developers to integrate their feature or service changes continuously and for IT and operations teams to deliver with the standards, security, and confidence businesses need.

What Is Continuous Integration?

A major prerequisite to CI/CD is Continuous Integration (CI). CI is an automated process for continually integrating software development changes. CI processes automate the building, testing, and validation of source code. By working with CI capabilities, developers can accelerate their code release cycles, making it less likely to run into long feature development cycles and the challenges that come with it, such as merge conflicts.

CI requires a version control system that can track changes and versions of software code. Git is a popular version control system. Using a git workflow, you can start the CI process. Developers working on a codebase use their version control systems to push their changes to a repository of code. The developers working on the codebase merge these changes into the main code branch once it has been reviewed.

The goal of CI is to produce a packaged artifact that is ready to deploy onto a server or machine. An example of an artifact can be a container image, WAR/JAR file, or any other executable packaged code. CI automates the process from code commit to packaged artifact.

Commonly, a developer will commit some code to a version control system like Git, which will trigger the CI process. This codebase is often scanned or analyzed using a static code analysis tool to determine code quality. If the source code passes all checks, including unit testing, the CI process will attempt to package or compile the code. CI can also involve tagging or annotating specific versions of code or managing resources such as branches within a version control system. 

Implementing CI can be the first step to producing high-quality code within your teams. There are many continuous integration tools available, like CircleCI, Travis CI, Harness CI, and more. Please review our article on Continuous Integration Tools to learn more about what’s available, from open-source tools to managed saas platforms. 

What Is Continuous Delivery?

The goal of continuous delivery is to deliver a packaged artifact into a production environment. CD automates the entire delivery process, including the deployment process. CD responsibilities can include provisioning infrastructure, managing changes (ticketing), deploying artifacts, verifying and monitoring those changes, and ensuring these changes do not happen if there are any issues.

Some organizations will leverage specific aspects of continuous delivery to help them manage their operational responsibilities. A good example is using a CD pipeline to handle the provisioning of infrastructure. Some organizations will use their CD pipelines to orchestrate the configuration and setup of infrastructure through configuration management automation tools like Ansible, chef, or puppet.

In continuous deployment, changes are deployed automatically, assuming that the code changes pass all of the tests and checks that a CI/CD pipeline incorporates. Unlike continuous deployment, in continuous delivery, organizations control when deployments happen. 

What's the Difference Between CI and CD?

A common question about CI and CD, what are their differences? 

Continuous integration (CI) enables software development teams and workflows. The greatest challenge for many development teams is feature development. Many organizations are under pressure to deliver quickly with innovation and quality. Working with code involves developing, merging conflicts, code management, and testing, contributing to long deployment lead times, infrequent deployments, and high change failure rates. The solution is to utilize CI to integrate development changes in an automated fashion, thereby improving feature development's cadence and process.

Continuous delivery (CD) enables operations teams and workflows. The goal is to safely and repeatedly deliver an artifact into a production environment. The CD process helps automate operationalizing services and involves releasing, deploying, and monitoring applications. As we promote an artifact into production or higher environments, we add rigor to the verification process. Adding additional tests to your testing process and into each stage or workflow for an environment allows us to catch issues before these issues are found by customers. 

How CI and CD Work Together

Today, we're shifting responsibilities and goals to the left to ensure issues are caught early on in the software delivery process. CI and CD work together to ensure we have the capabilities and visibility to catch and fix defects and potential production failures or incidents that can be otherwise detrimental to a business. CI/CD pipelines act as automated delivery pipelines, mimicking the entire software development life cycle (SDLC) that otherwise can be hard to understand, improve, share, and control.

Example of a CI/CD Pipeline

Below is an illustration of a basic CI/CD pipeline. Note the different stages that are involved in getting an idea or change out to a production environment. 

Your pipeline may look different. There is no one pipeline that fits all use cases. It is common to have multiple pipelines for different teams and services. If you’re curious about building your own CI/CD pipeline, we discuss further in our CI/CD best practices guide.

CI/CD Pipeline Characteristics

There are several characteristics of a CI/CD pipeline lending to several DevOps metrics and insights that are worth capturing and utilizing to make data-driven software delivery improvements and decisions. These characteristics are related to speed, reliability, and accuracy. Hence the focus on metrics like deployment frequency, lead time to deployment, change failure rate, and mean time to restore.

In order to achieve these pipeline characteristics, typical elements of CI/CD pipeline will include tools or processes that involve:

These elements are described in more detail in our CI/CD Pipeline guide. 

The Benefits of a Streamlined CI/CD Pipeline

Optimized workflows for creating CI/CD pipelines provide many benefits to organizations and cross-functional software delivery teams. So, what are the benefits of CI/CD? Here are a few that we found through survey reports and discussions with CI/CD platform users:

  • Improved developer productivity,
  • Increased time and resources for code and team improvement,
  • Improved capabilities for feedback, collaboration, and quality by contributors,
  • Fewer software defects and bugs found by testers,
  • Drastic improvements to testing involving continuous testing and automated integration tests,
  • Automated CD pipeline changes to multiple cloud environments,
  • Fast and easy implementation of CI/CD pipelines with Kubernetes and serverless architectures,
  • More frequent code deployments with less risk and fewer resources,
  • New code and applications can be onboarded into a CI/CD pipeline in less than a day,
  • Improved ability to deliver the product that users need. 

CI/CD Tools & Platforms

There are many relevant solutions for implementing CI/CD capabilities. Jenkins, Spinnaker, Argo CD, GitLab, GitHub Actions, and Harness are some CI/CD tools and platforms that can be helpful for creating CI/CD pipelines for your software applications and services. If you'd like to see a feature-to-feature comparison of these solutions, check out our DevOps tool comparisons.

Build, Test, Deploy, and Verify On-Demand with Harness

Every organization with software services has a stake in delivering said service to its users. CI/CD is a core area of improvement for organizations and teams looking to deliver their services without hassle and burnout of trying to reproduce issues and repeat one-off deployments. This blog post shared everything you needed to know about CI/CD and software delivery.If you're curious to learn more, feel free to try Harness, an all-in-one software delivery platform.

If you're just getting started on your CI/CD tooling decision, do check out our CI/CD Buyer's Guide - it'll help you make your decision.

Sign up now

Sign up for our free plan, start building and deploying with Harness, take your software delivery to the next level.

Get a demo

Sign up for a free 14 day trial and take your software development to the next level

Documentation

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

Case studies

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback?
Share your thoughts by creating a new topic in the Harness community forum.

Sign up for our monthly newsletter

Subscribe to our newsletter to receive the latest Harness content in your inbox every month.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Platform