Gitlab hero border pattern left svg Gitlab hero border pattern right svg
Gitlab logo svg

Continuous Integration (CI) with GitLab

Powerful automation to build and test faster at any scale

The benefits of single application CI/CD

Continuous integration is built-in

Continuous Integration (CI) works to integrate code provided by your team in a shared repository. Developers share the new code in a merge request (MR). The request triggers a pipeline to build, test, and validate the new code prior to merging the changes within your repository.

The practice of Continuous Delivery (CD) ensures the delivery of CI-validated code to your application via structured deployment pipelines.

Together, CI and CD help your team deliver faster results for your customers and stakeholders. CI helps you catch and eliminate bugs early in the development cycle, and CD ensures only verified code is sent to your applications.

CI and CD must work together to help your team build quickly and effectively, and are critical for fully-optimized software development.


Why your team needs CI

Less manual work, more automation

  • Detect errors as quickly as possible: Fix problems while fresh in developers minds
  • Reduce integration problems: Smaller problems are easier to digest and solve
  • Avoid compounding problems: Allows teams to develop faster, with more confidence

Seamless path to CD

  • Ensure every change is releasable: Test everything, including deployment, before calling it done
  • Lower the risk of each release: Make releases “boring”
  • Deliver value more frequently: Reliable deployments mean more releases
  • Tight customer feedback loops: Fast and frequent customer feedback on changes
Updated CI/CD Pipeline

Advantages of using GitLab for CI

  • Integrated: CI is built into GitLab, enabling a single conversation from ideation, to planning, to deployment (and beyond)
  • Open source: CI, along with CD, is a part of both the open source GitLab Community Edition and the proprietary GitLab Enterprise Edition
  • Easy to learn: See our Quick Start guide
  • Seamless: Part of the single GitLab application, with a single great user experience
  • Scalable: Tests run distributed on separate machines – add as many as you want
  • Faster results: Each build can be split in multiple jobs that run in parallel on multiple machines
  • Optimized for delivery: Multiple stages, manual deploy gates, environments, and variables
GitLab CI/CD

Features

  • Multi-platform: Execute builds on Unix, Windows, macOS, and any other platform that supports Go.
  • Multi-language: Build scripts are command-line driven and work with Java, PHP, Ruby, C, and any other language.
  • Stable: Builds run on a different machine than GitLab.
  • Parallel builds: GitLab distributes workloads across multiple machines for faster execution.
  • Realtime logging: A link in the merge request takes you to the current build log that updates dynamically.
  • Flexible pipelines: Define multiple parallel jobs per stage and you can trigger other builds.
  • Versioned pipelines: A .gitlab-ci.yml file contains your tests and overall process steps, allowing everyone to contribute changes and ensuring every branch gets the pipeline it needs.
  • Autoscaling: Automatically spin up and down VM's to minimize costs and make sure your builds get processed immediately.
  • Job artifacts: GitLab Runner uploads binaries and other job artifacts to GitLab, downloadable as a single archive with the GitLab UI or the GitLab API.
  • Test locally: There are multiple executors and you can reproduce tests locally.
  • Docker support: Use custom Docker images, spin up services as part of testing, build new Docker images, even run on Kubernetes.
  • Container registry: Built-in container registry to store, share, and use container images.
  • Protected variables: Securely store and use secrets during deployments using per environment protected variables
  • Environments: Define multiple environments including temporary Review Apps , see deployment history for every environment.

GitLab is one application for the entire DevOps lifecycle

  • Build your application using GitLab Runners
  • Run unit and integration tests to check if your code is valid
  • Look at a live preview of your development branch with Review Apps before merging into stable
  • Deploy to multiple environments like staging and production, and support advanced features such as canary deployments
  • Monitor performances and status of your application

GitLab is built for cloud native

  • Define your CI job environments with immutable Docker container images for consistency and reproducibility
  • Utilize our Kubernetes integration to enable features like AutoDevOps, deploy boards, review apps and canary deployments
  • Use our cloud ceployment templates to easily deploy to cloud container and Kubernetes environments

Fully integrated with GitLab

  • Quick project setup: Add projects with a single click, all hooks are set up automatically via the GitLab API.
  • Merge request integration: See the status of each build within the GitLab merge request.

Architecture

GitLab CI/CD is built into GitLab, a web application with an API that stores its state in a database. It manages projects/builds and provides a nice user interface, in addition to other GitLab features.

GitLab Runner is an application that processes builds. It can be deployed separately and works with GitLab CI/CD through an API.

In order to run tests, you need at least one GitLab instance and one GitLab Runner.


GitLab Runner

To perform the actual build, you need to install GitLab Runner which is written in Go.

It can run on any platform where you build Go binaries, including Linux, macOS, Windows, FreeBSD and Docker.

It can test any programming language including .Net, Java, Python, C, PHP and others.

GitLab Runner has many features, including autoscaling, great Docker support, and the ability to run multiple jobs concurrently.

Install GitLab Runner



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