gitlab-org--gitlab-foss/doc/ci
2019-05-02 10:28:39 +00:00
..
autodeploy Docs: Add automatic redirects to many moved files 2019-03-11 05:54:25 +00:00
build_artifacts Docs: Add automatic redirects to many moved files 2019-03-11 05:54:25 +00:00
caching Docs: Fix all anchors related to YAML 2019-02-22 00:25:06 +00:00
chatops Docs: Fix anchors related to variables doc 2019-04-08 12:32:38 +00:00
docker Update auth with registry docs 2019-04-09 09:32:27 +00:00
environments Docs: Environments Documentation review 2019-04-28 23:13:52 +00:00
examples Update CodeQuality example docs 2019-04-17 11:25:18 +02:00
img Merge feature set tables into one 2019-04-30 00:50:53 +00:00
interactive_web_terminal Update web terminal note for shared runners 2019-01-30 08:45:40 +01:00
introduction Docs: CI/CD intro - add new illustration + description 2019-04-16 16:35:37 +00:00
large_repositories Add doc cross links for large repositories 2019-04-23 04:11:19 +00:00
merge_request_pipelines Docs: update feature name "Pipelines for Merged Results" 2019-04-22 12:43:02 +00:00
permissions Docs: Fix CI/CD related anchors 2019-03-11 01:47:01 +00:00
quick_start README.md: fix URL to CI Lint 2019-03-26 08:05:58 +00:00
review_apps Refactor review apps doco and CI landing page 2019-04-15 21:45:19 +00:00
runners Fix wrong docs on untagged jobs 2019-02-17 22:19:43 +00:00
services Docs: Fix CI/CD related anchors 2019-03-11 01:47:01 +00:00
ssh_keys Docs: Fix anchors related to variables doc 2019-04-08 12:32:38 +00:00
triggers Docs: Fix anchors related to variables doc 2019-04-08 12:32:38 +00:00
variables Clarify masked variables docs 2019-04-28 22:55:04 +00:00
yaml Fix text based on example 2019-04-29 11:43:26 +00:00
enable_or_disable_ci.md
environments.md Docs: Environments Documentation review 2019-04-28 23:13:52 +00:00
git_submodules.md
junit_test_reports.md Add example for the artifacts:paths section 2019-05-01 22:52:58 +00:00
pipelines.md Apply suggestion to doc/ci/pipelines.md 2019-05-01 15:36:16 +00:00
README.md Merge feature set tables into one 2019-04-30 00:50:53 +00:00

comments description
false Learn how to use GitLab CI/CD, the GitLab built-in Continuous Integration, Continuous Deployment, and Continuous Delivery toolset to build, test, and deploy your application.

GitLab Continuous Integration (GitLab CI/CD)

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)

Overview

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.

Getting started

GitLab CI/CD is configured by a file called .gitlab-ci.yml placed at the repository's root. The scripts set in this file are executed by the GitLab Runner.

To get started with GitLab CI/CD, we recommend you read through the following documents:

You can also get started by using one of the .gitlab-ci.yml templates 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:

Use a .gitlab-ci.yml template

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.

NOTE: Note: GitLab CI/CD and shared runners are enabled in GitLab.com and available for all users, limited only to the user's pipelines quota.

GitLab CI/CD configuration

GitLab CI/CD supports numerous configuration options:

Configuration Description
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.
Schedule pipelines Schedule pipelines to run as often as you need.
Custom path for .gitlab-ci.yml 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.
Pipelines triggers Trigger pipelines through the API.
Integrate with Kubernetes clusters Connect your project to Google Kubernetes Engine (GKE) or an existing Kubernetes cluster.
GitLab Runner Configure your own GitLab Runners to execute your scripts.
Optimize GitLab and Runner for large repositories Recommended strategies for handling large repos.
.gitlab-ci.yml full reference All the attributes you can use with GitLab CI/CD.

Note that certain operations can only be performed according to the user and job permissions.

GitLab CI/CD feature set

You can also use the vast GitLab CI/CD feature set to easily configure it for specific purposes:

Feature Description
Auto Deploy Deploy your application to a production environment in a Kubernetes cluster.
Auto DevOps Set up your app's entire lifecycle.
Building Docker images Maintain Docker-based projects using GitLab CI/CD.
Canary Deployments [PREMIUM] Ship features to only a portion of your pods and let a percentage of your user base to visit the temporarily deployed feature.
ChatOps Trigger CI jobs from chat, with results sent back to the channel.
CI services Link Docker containers with your base image.
Container Scanning [ULTIMATE] Check your Docker containers for known vulnerabilities.
Dependency Scanning [ULTIMATE] Analyze your dependencies for known vulnerabilities.
Deploy Boards [PREMIUM] Check the current health and status of each CI/CD environment running on Kubernetes.
Feature Flags [PREMIUM] Deploy your features behind Feature Flags.
GitLab CI/CD for external repositories [PREMIUM] Get the benefits of GitLab CI/CD combined with repositories in GitHub and BitBucket Cloud.
GitLab Pages Deploy static websites.
GitLab Releases Add release notes to Git tags.
Interactive Web Terminals [CORE ONLY] Open an interactive web terminal to debug the running jobs.
JUnit tests Identify script failures directly on merge requests.
Review Apps Configure GitLab CI/CD to preview code changes.
Security Test reports [ULTIMATE] Check for app vulnerabilities.
Using Docker images Use GitLab and GitLab Runner with Docker to build and test applications.

GitLab CI/CD examples

GitLab provides examples of configuring GitLab CI/CD in the form of:

GitLab CI/CD administration [CORE ONLY]

As a GitLab administrator, you can change the default behavior of GitLab CI/CD for:

See also:

References

Why GitLab CI/CD?

The following articles explain reasons to use GitLab CI/CD for your CI/CD infrastructure:

See also the Why CI/CD? presentation.

Breaking changes

As GitLab CI/CD has evolved, certain breaking changes have been necessary. These are: