Simply put, the CI/CD pipeline is a workflow for DevOps teams to automate the software delivery process. CI/CD stands for continuous integration/continuous delivery, a software delivery method development teams use to deliver code changes more frequently and reliably. CI/CD embodies two sets of complementary practices, each of which rely heavily on automation.
In the continuous integration process, development teams implement small, regular application code changes and merge them into a shared repository. Modern applications are developed using a variety of tools and platforms, requiring a means of integration and validation of every code change to make sure those changes don’t break the application. Continuous integration automates the process of building, packaging and testing code whenever a team member executes version control changes. This makes it easier for teams to commit code changes more frequently, resulting in improved collaboration and app quality.
Continuous delivery is a workflow engine that allows you to kick off processes like testing for bugs and uploading the development team’s code changes to a staging repository.
The CI/CD process is important because it makes deploying processes easier and more predictable. It also brings consistency and reliability to the software development process, resulting in improved collaboration between development teams and operations, lower costs and better applications.
In this article, we’ll provide a small tutorial on the CI/CD pipeline process, discuss its uses and best delivery practices and explore the numerous benefits CI/CD can bring to the development life cycle and ultimately, your entire organization.
DevOps is an approach to IT delivery that combines people, practices and tools to break down silos between development and operations teams. DevOps bridges the gap between software development (where application code is created) and IT operations (where those applications are put into production, made available to end users and maintained.) DevOps teams accelerate the development of applications and services and, with a more responsive approach to management of the IT infrastructure, can deploy and update IT products to stay competitive with the industry.
DevOps grew in part from the agile development movement as a way to solve one of its critical issues — while agile developers produced new apps and code updates more frequently, traditional operations teams struggled to test and deploy them, negating the value of rapid development. By extending agile principles across the entire software development life cycle (SDLC), DevOps is able to optimize the entire workflow with a goal of continuous improvement. High-performing DevOps teams not only see faster code iterations and deployments, but overall shorter time to market for new ideas, fewer bugs and more stable infrastructure.
CI/CD is a foundational process in DevOps. Developers regularly incorporate new code — often daily — into the main source code. As this new code is checked into a central, shared repository, an automated build process tests and validates the changes, allowing developers to quickly identify problems and receive immediate feedback so they can make any necessary adjustments.
The CI/CD pipeline is essentially a workflow that provides a pathway through which DevOps teams automate the software delivery process. In the absence of an automated pipeline, teams would have to configure their workflow to be performed manually, which is time-consuming and prone to error. The CI/CD pipeline removes manual errors, standardizes developers’ feedback loops and increases the speed of product iterations.
Predecessors to CI/CD include application release automation (ARA) and automated release management (ARM), both of which fall under the category of work “release automation,” and represent new iterations of evolving automated processes and trends in this space.
There isn’t a standard methodology or implementation for a CI/CD pipeline, and each DevOps team will choose the tools and services they’ll use to build theirs, but a pipeline typically includes the following stages:
At every stage of the pipeline, the development team receives alerts to errors so they can immediately address the issue. The code changes go through the pipeline again, so only error-free code is deployed to production.
Continuous deployment is the process of deploying by automating the release of code changes into the production environment, which occurs after new code is integrated and approved through continuous integration and continuous delivery. The code changes run through a series of automated tests, and once they pass, are pushed immediately to the software’s users.
Continuous deployment may sound synonymous with continuous delivery — and both are often referred to by the abbreviation “CD” — but it is a separate practice. Continuous delivery is a delivery process that automatically pushes new builds to an automated QA testing environment to look for bugs and other issues, and once it passes, is approved for deployment and automatically pushed to end users. Because it doesn’t require any pause for human mediation, this final stage is known as continuous deployment.
Although continuous deployment extends the agility and velocity of CI/CD, it comes with its own set of risks because there is no manual intervention between final testing and release to users. Because of this issue, it’s not well-suited for software involving security of sensitive data, regulatory compliance or high financial stakes.
CI/CD is used to streamline and automate software development to deliver apps and services more quickly and frequently. CI/CD accomplishes this largely through automation, which accelerates testing, feedback, code corrections and deployment.
Implementing CI/CD practices offers many benefits:
While every CI/CD pipeline orchestration and implementation will be a bit different, below are some basic guidelines to help you address common issues and maintain the most effective pipeline for your organization:
There are a few things to keep in mind when implementing a CI/CD process:
AWS (Amazon Web Services) and GCP (Google Cloud Platform) are two popular DevOps-as-a-Service (DaaS) options. Both have unique pros and cons.
AWS is typically fast, offers an easy way to migrate your DevOps to the cloud and operates on a convenient pay-as-you-go model. GCP makes a wealth of tools, such as Stackdriver Monitoring, Stackdriver Debugger, Stackdriver Logging, a security scanner service (App Engine), available to use in your application life cycle pipeline.
Both offer quality DevOps solutions, so the differentiators come down to price and operational zones.
There are a few things to consider when looking for CI/CD tools to add to your development tools chain.
The first is whether you want to use an open-source CI/CD tool versus a commercial one (it delivers the code) or build your own. An open source solution saves money, but there’s the risk that the developers may drastically alter the code or stop developing the product altogether. Also, open source tools often come with minimal support. Commercial tools, on the other hand, usually offer strong support and have more predictable update cycles, but they can be costly and can offer less flexible integration. Building your own solution lets you tailor it to your organization’s unique needs but requires a lot of resources.
Another consideration is the hosting model. If your codebase has to remain on premises, you’ll need a toolchain that you can deploy on your own servers or virtual infrastructure. However, CI/CD tools are predominantly aligned with cloud and cloud-native infrastructure, so CI/CD tools are also offered as part of a SaaS (software-as-a-service) model that runs on the vendor’s cloud infrastructure, allowing you to offload many of the support costs.
However you answer these questions, you’ll also need to consider the associated costs. Despite the upfront savings of an open source tool, you’ll incur costs setting up and supporting the tool on your infrastructure and lose some productivity as developers learn how to use it. With commercial off-the-shelf and SaaS tools, you will generally pay a fee based on your usage level.
Choosing the best option for your organization will come down to determining how many builds you’ll be doing, whether or not you’ll be doing concurrent builds and how many users will access the tool.
The speed at which you deliver software is a big market differentiator. Successful companies boast up to 50 to 100 deployments per day, with some giants like Netflix topping 1,000. A functional CI/CD pipeline cultivates the productivity, reliability and speed required to reach these numbers and deliver the robust applications necessary to meet ever-changing business needs. Simply put, if you’re not following CI/CD practices, you’re running the risk your business will get left behind. Transforming your software delivery isn’t fast or easy, but the effort is worth it and will position your business to thrive for years to come.
See an error or have a suggestion? Please let us know by emailing ssg-blogs@splunk.com.
This posting does not necessarily represent Splunk's position, strategies or opinion.
The Splunk platform removes the barriers between data and action, empowering observability, IT and security teams to ensure their organizations are secure, resilient and innovative.
Founded in 2003, Splunk is a global company — with over 7,500 employees, Splunkers have received over 1,020 patents to date and availability in 21 regions around the world — and offers an open, extensible data platform that supports shared data across any environment so that all teams in an organization can get end-to-end visibility, with context, for every interaction and business process. Build a strong data foundation with Splunk.