gitlab-org--gitlab-foss/doc/ci
Ash McKenzie 7cc631d251 Merge branch 'fix-doc-interruptible-env-default' into 'master'
Fixes interruptible property documentation

See merge request gitlab-org/gitlab-ce!32758
2019-09-09 11:04:52 +00:00
..
autodeploy
build_artifacts
caching Fix broken markdown in various docs 2019-08-30 03:29:45 +00:00
chatops Fix introduced section in chatops doc 2019-08-12 04:24:38 +00:00
ci_cd_for_external_repos Add note about GitHub OAuth 2019-08-30 11:15:00 +00:00
directed_acyclic_graph Fix markdown in various docs 2019-08-28 06:06:34 +00:00
docker Add DinD example note for k8s executors 2019-09-09 06:02:59 +00:00
environments Changing badges to use parentheses not brackets 2019-07-08 08:50:38 +00:00
examples Merge browser performance testing docs together 2019-09-06 07:19:41 +00:00
img Compress images with pngquant 2019-08-07 10:01:48 +00:00
interactive_web_terminal Remove trailing whitespace in docs 2019-07-12 08:15:38 +00:00
introduction Compress images with pngquant 2019-08-07 10:01:48 +00:00
jenkins Fix markdown in various docs 2019-08-28 06:06:34 +00:00
large_repositories Update large repositories, remove duplicated text 2019-09-03 18:08:53 +00:00
merge_request_pipelines Follow up documentation for Merge Trains cancel when running 2019-09-06 08:39:55 +00:00
permissions
quick_start Docs: Refresh CI quick start screenshots 2019-08-19 00:26:04 +00:00
review_apps Fix markdown spacing in various docs 2019-08-12 09:53:30 +00:00
runners Fixes Introduced in text for our renderer 2019-08-28 05:57:25 +00:00
services Fix markdown in various docs 2019-08-28 06:06:34 +00:00
ssh_keys Remove inoperative >/dev/null 2019-08-08 18:14:21 +00:00
triggers Fix markdown in various docs 2019-08-28 06:06:34 +00:00
variables Removing 'Premium' label in block title 2019-09-04 05:44:18 +00:00
yaml Fixes documentation about default value of interruptible property 2019-09-09 08:35:20 +02:00
enable_or_disable_ci.md SSoT audit fixes 2019-06-07 08:00:41 +00:00
environments.md Removing 'Premium' label in block title 2019-09-04 05:44:18 +00:00
git_submodules.md Add blank lines around code blocks 2019-07-12 08:09:23 +00:00
junit_test_reports.md
metrics_reports.md Changing badges to use parentheses not brackets 2019-07-08 08:50:38 +00:00
multi_project_pipeline_graphs.md
multi_project_pipelines.md Add docs required version for mirroring status 2019-09-06 03:34:08 +00:00
pipelines.md Issue #39099: Add links for latest pipelines 2019-08-22 08:49:40 -05:00
README.md Rename all filenames and occurrences to License Compliance 2019-08-28 06:48:58 +00:00

comments description type
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. index

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)

NOTE: Out-of-the-box management systems can decrease hours spent on maintaining toolchains by 10% or more. Watch our "Mastering continuous software development" webcast to learn about continuous methods and how GitLabs built-in CI can help you simplify and scale software development.

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.

For a video demonstration of GitLab CI/CD, see Demo: 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:

If you're coming over from Jenkins, you can also check out our handy reference for converting your pipelines.

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.

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.
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.
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.

Feature set

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.

Feature Description
Configure
Auto DevOps Set up your app's entire lifecycle.
ChatOps Trigger CI jobs from chat, with results sent back to the channel.
---+---
Verify
Browser Performance Testing Quickly determine the performance impact of pending code changes.
CI services Link Docker containers with your base image.
Code Quality (STARTER) Analyze your source code quality.
GitLab CI/CD for external repositories (PREMIUM) Get the benefits of GitLab CI/CD combined with repositories in GitHub and BitBucket Cloud.
Interactive Web Terminals (CORE ONLY) Open an interactive web terminal to debug the running jobs.
JUnit tests Identify script failures directly on merge requests.
Using Docker images Use GitLab and GitLab Runner with Docker to build and test applications.
---+---
Release
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 (PREMIUM) 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 (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 Pages Deploy static websites.
GitLab Releases Add release notes to Git tags.
Review Apps Configure GitLab CI/CD to preview code changes.
---+---
Secure
Container Scanning (ULTIMATE) Check your Docker containers for known vulnerabilities.
Dependency Scanning (ULTIMATE) Analyze your dependencies for known vulnerabilities.
License Compliance (ULTIMATE) Search your project dependencies for their licenses.
Security Test reports (ULTIMATE) Check for app vulnerabilities.

Examples

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.

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:

12.0

11.0

  • No breaking changes.

10.0

  • No breaking changes.

9.0