Continuous integration

Continuous integration automates software development workflows, reduces costs, and ensures code quality.

Watch a GitLab CI/CD webcast →

Continuous integration

What is CI/CD?

Continuous integration (CI). enables DevOps teams to increase the speed of software development through automation. Continuous integration works to implement code from your team in a shared repository which vastly improves your deployment pipeline. Developers that employ use CI 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 the repository.

All code is tested throughout each stage to secure better quality builds and applications with fewer bugs. CI/CD 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 of the development process, it is 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.

What are the benefits of continuous integration?

  1. More time for innovation
  2. Better retention rates
  3. More revenue
  4. Business efficiency

Learn more about the benefits of continuous integration →.

CI fundamentals

Continuous integration is all about efficiency and is built around these core elements to make it effective.

A single source repository

Source code management (SCM) that houses all necessary files and scripts to create builds.

Automated builds

Scripts should include everything you need to build from a single command.

Builds should be self-testing

Testing scripts should ensure that the failure of a test should result in a failed build.

Frequent iterations

Multiple commits to the repository mean there are fewer places for conflicts to hide.

Stable testing environments

Code should be tested in a cloned version of the production environment.

Maximum visibility

Every developer should be able to access the latest executables and see any changes made to the repository.

Why Gitlab CI/CD?

In order to complete all the required fundamentals of full 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.

GitLab CI/CD rated

Build, test, deploy, and monitor your code from a single application.

We believe a single application that offers visibility across the entire SDLC is the best way to ensure that every development stage is included and optimized. When everything is under one roof, it’s easy to pinpoint workflow bottlenecks and evaluate the impact each element has on deployment speed. GitLab has CI/CD built right in, no plugins required.

CI Resources

Here’s a list of resources on CI that we find to be particularly helpful. We would love to get your recommendations on books, blogs, videos, podcasts, and other resources that tell a great story or offer valuable insight.

Share your favorites with us by tweeting us @gitlab!

Suggested Content

Try all GitLab features - free for 30 days

GitLab is more than just source code management or CI/CD. It is a full software development lifecycle & DevOps tool in a single application.

Try GitLab Free
Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license