What is CI/CD?
Continuous integration (CI) and continuous delivery (CD) enables DevOps teams to deliver better quality code, faster. Continuous integration works to integrate code from your team in a shared repository. Developers share their new code in a Merge (Pull) Request, which triggers a pipeline to build, test, and validate the new code before merging the changes in your repository. Continuous delivery deploys CI-validated code to your application.
Code is tested throughout each stage, ensuring better quality builds and applications with fewer bugs. Pipelines can determine what happens when builds pass or fail these tests, meaning that errors are identified much faster. As code goes through each stage, it’s continually validated against many other changes in the repository happening concurrently, which ensures code integrity throughout the pipeline. Together, CI and CD accelerate how quickly your team delivers results for your customers and stakeholders.
Continuous Integration is the practice of integrating code into a shared repository and building/testing each change automatically, as early as possible – usually several times a day.
Continuous Delivery ensures CI-validated code can be released to production at any time.
Continuous delivery is often used interchangeably with continuous deployment, but there is a subtle difference between the two. Continuous deployment means that all validated code deploys to production automatically, whereas continuous delivery means that this code _can_ be deployed. The flexibility for code to deployed at any time is what differentiates delivery from deployment, and continuous deployment is possible when continuous delivery is already in place.
Benefits of CI/CD
CI/CD automates workflows and reduces error rates, which can have far-reaching impacts throughout an organization.
- More time for innovation
- Better retention rates
- More revenue
- Business efficiency
For example, a dev environment with less manual tasks means that engineers can spend more time on revenue-generating projects. With fewer errors, teams are more efficient and spend less time putting out fires. When processes are automated, engineers are happier and can focus on where they add the most value.
CI/CD brings automation into the DevOps lifecycle. With less manual work, DevOps teams work more efficiently and with greater speed. An automated workflow also reduces the chance of human error and improves handoffs, which improves overall operational efficiency. Organizations that implement CI/CD make better use of their resources and will have a competitive edge over those that don't use CI/CD.
CI/CD is all about efficiency and is built around fundamental elements to make it effective.
Why Gitlab CI/CD?
In order to complete all the required fundamentals of CI/CD, many CI platforms rely on integrations with other tools to fulfill those needs. Many organizations have to maintain costly and complicated toolchains in order to have full CI/CD capabilities. This often means maintaining a separate SCM like Bitbucket or GitHub, connecting to a separate testing tool, that connects to their CI tool, that connects to a deployment tool like Chef or Puppet, that also connects to various security and monitoring tools.
Instead of just focusing on building great software, organizations have to also maintain and manage a complicated toolchain. GitLab is a single application for the entire DevOps lifecycle, meaning we fulfill all the fundamentals for CI/CD in one environment.
Here’s a list of resources on CI/CD that we find to be particularly helpful in understanding CI/CD and implementation. We would love to get your recommendations on books, blogs, videos, podcasts and other resources that tell a great CI/CD story or offer valuable insight on the definition or implementation of the practice.
Please share your favorites with us by tweeting us @GitLab!