- Getting started
- Feature set
GitLab CI/CD is a tool built into GitLab for software development through the continuous methodologies:
- Continuous Integration (CI)
- Continuous Delivery (CD)
- Continuous Deployment (CD)
Continuous Integration works by pushing small code chunks to your application’s code base hosted in a Git repository, and, to every push, run a pipeline of scripts to build, test, and validate the code changes before merging them into the main branch.
Continuous Delivery and Deployment consist of a step further CI, deploying your application to production at every push to the default branch of the repository.
These methodologies allow you to catch bugs and errors early in the development cycle, ensuring that all the code deployed to production complies with the code standards you established for your app.
For a complete overview of these methodologies and GitLab CI/CD, read the Introduction to CI/CD with GitLab.
GitLab CI/CD is configured by a file called
at the repository’s root. This file creates a pipeline, which runs for changes to the code in the repository. Pipelines consist of one or more stages that run in order and can each contain one or more jobs that run in parallel. These jobs (or scripts) get executed by the GitLab Runner agent.
To get started with GitLab CI/CD, we recommend you read through the following documents:
- How GitLab CI/CD works.
- Fundamental pipeline architectures.
- GitLab CI/CD basic workflow.
Step-by-step guide for writing
.gitlab-ci.ymlfor the first time.
If you’re migrating from another CI/CD tool, check out our handy references:
You can also get started by using one of the
available through the UI. You can use them by creating a new file,
choosing a template that suits your application, and adjusting it
to your needs:
For a broader overview, see the CI/CD getting started guide.
Once you’re familiar with how GitLab CI/CD works, see the
.gitlab-ci.yml full reference
for all the attributes you can set and use.
GitLab CI/CD uses a number of concepts to describe and run your build and deploy.
|Pipelines||Structure your CI/CD process through pipelines.|
|Environment variables||Reuse values based on a variable/value key pair.|
|Environments||Deploy your application to different environments (e.g., staging, production).|
|Job artifacts||Output, use, and reuse job artifacts.|
|Cache dependencies||Cache your dependencies for a faster execution.|
|GitLab Runner||Configure your own runners to execute your scripts.|
|Pipeline efficiency||Configure your pipelines to run quickly and effienctly.|
GitLab CI/CD supports numerous configuration options:
|Schedule pipelines||Schedule pipelines to run as often as you need.|
|Custom path for ||Define a custom path for the CI/CD configuration file.|
|Git submodules for CI/CD||Configure jobs for using Git submodules.|
|SSH keys for CI/CD||Using SSH keys in your CI pipelines.|
|Pipeline triggers||Trigger pipelines through the API.|
|Pipelines for Merge Requests||Design a pipeline structure for running a pipeline in merge requests.|
|Integrate with Kubernetes clusters||Connect your project to Google Kubernetes Engine (GKE) or an existing Kubernetes cluster.|
|Optimize GitLab and GitLab Runner for large repositories||Recommended strategies for handling large repositories.|
|All the attributes you can use with GitLab CI/CD.|
Use the vast GitLab CI/CD to easily configure it for specific purposes. Its feature set is listed on the table below according to DevOps stages.
|Auto DevOps||Set up your app’s entire lifecycle.|
|ChatOps||Trigger CI jobs from chat, with results sent back to the channel.|
|Browser Performance Testing||Quickly determine the browser performance impact of pending code changes.|
|Load Performance Testing||Quickly determine the server performance impact of pending code changes.|
|CI services||Link Docker containers with your base image.|
|Code Quality||Analyze your source code quality.|
|GitLab CI/CD for external repositories||Get the benefits of GitLab CI/CD combined with repositories in GitHub and Bitbucket Cloud.|
|Interactive Web Terminals||Open an interactive web terminal to debug the running jobs.|
|Unit test reports||Identify script failures directly on merge requests.|
|Using Docker images||Use GitLab and GitLab Runner with Docker to build and test applications.|
|Auto Deploy||Deploy your application to a production environment in a Kubernetes cluster.|
|Building Docker images||Maintain Docker-based projects using GitLab CI/CD.|
|Canary Deployments||Ship features to only a portion of your pods and let a percentage of your user base to visit the temporarily deployed feature.|
|Deploy Boards||Check the current health and status of each CI/CD environment running on Kubernetes.|
|Feature Flags||Deploy your features behind Feature Flags.|
|GitLab Pages||Deploy static websites.|
|GitLab Releases||Add release notes to Git tags.|
|Review Apps||Configure GitLab CI/CD to preview code changes.|
|Cloud deployment||Deploy your application to a main cloud provider.|
|Container Scanning||Check your Docker containers for known vulnerabilities.|
|Dependency Scanning||Analyze your dependencies for known vulnerabilities.|
|License Compliance||Search your project dependencies for their licenses.|
|Security Test reports||Check for app vulnerabilities.|
Find example project code and tutorials for using GitLab CI/CD with a variety of app frameworks, languages, and platforms on the CI Examples page.
GitLab also provides example projects pre-configured to use GitLab CI/CD.
As a GitLab administrator, you can change the default behavior of GitLab CI/CD for:
Learn more about:
- Why you might chose GitLab CI/CD.
- Reasons you might migrate from another platform.
- 5 Teams that made the switch to GitLab CI/CD
See also the Why CI/CD? presentation.
As GitLab CI/CD has evolved, certain breaking changes have been necessary. These are:
- Remove Fedora 29 package support.
- Remove macOS 32-bit support.
- Remove support for array of strings when defining services for Docker executor.
--docker-servicesflag on register command.
- Remove legacy build directory caching.
- Remove support for Windows Server 1803.
- Use refspec to clone/fetch Git repository.
- Old cache configuration.
- Old metrics server configuration.
- Remove Linux distributions that reach EOL.
- Update command line API for helper images.
- No breaking changes.
- No breaking changes.