2020-03-13 11:09:21 -04:00
---
2020-05-29 14:08:26 -04:00
stage: Verify
2021-05-26 11:10:57 -04:00
group: Pipeline Execution
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-03-13 17:09:38 -04:00
disqus_identifier: 'https://docs.gitlab.com/ee/ci/pipelines.html'
2020-03-13 11:09:21 -04:00
type: reference
---
2021-03-14 23:09:11 -04:00
# CI/CD pipelines **(FREE)**
2020-03-13 11:09:21 -04:00
2020-12-07 22:09:37 -05:00
NOTE:
2020-04-10 02:09:41 -04:00
Watch the
2020-03-13 11:09:21 -04:00
["Mastering continuous software development" ](https://about.gitlab.com/webcast/mastering-ci-cd/ )
2020-04-10 02:09:41 -04:00
webcast to see a comprehensive demo of a GitLab CI/CD pipeline.
2020-03-13 11:09:21 -04:00
Pipelines are the top-level component of continuous integration, delivery, and deployment.
Pipelines comprise:
2020-04-10 02:09:41 -04:00
- Jobs, which define *what* to do. For example, jobs that compile or test code.
- Stages, which define *when* to run the jobs. For example, stages that run tests after stages that compile the code.
2020-03-13 11:09:21 -04:00
2021-06-28 08:38:12 -04:00
Jobs are executed by [runners ](../runners/index.md ). Multiple jobs in the same stage are executed in parallel,
2020-04-10 02:09:41 -04:00
if there are enough concurrent runners.
2020-03-13 11:09:21 -04:00
2020-04-14 23:09:11 -04:00
If *all* jobs in a stage succeed, the pipeline moves on to the next stage.
2020-03-13 11:09:21 -04:00
2020-04-14 23:09:11 -04:00
If *any* job in a stage fails, the next stage is not (usually) executed and the pipeline ends early.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
In general, pipelines are executed automatically and require no intervention once created. However, there are
also times when you can manually interact with a pipeline.
A typical pipeline might consist of four stages, executed in the following order:
- A `build` stage, with a job called `compile` .
- A `test` stage, with two jobs called `test1` and `test2` .
- A `staging` stage, with a job called `deploy-to-stage` .
- A `production` stage, with a job called `deploy-to-prod` .
2020-12-04 16:09:29 -05:00
NOTE:
2021-07-15 05:09:35 -04:00
If you have a [mirrored repository that GitLab pulls from ](../../user/project/repository/repository_mirroring.md#pull-from-a-remote-repository ),
2020-03-13 11:09:21 -04:00
you may need to enable pipeline triggering in your project's
**Settings > Repository > Pull from a remote repository > Trigger pipelines for mirror updates**.
2020-04-10 02:09:41 -04:00
## Types of pipelines
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
Pipelines can be configured in many different ways:
2020-03-13 11:09:21 -04:00
2020-04-14 23:09:11 -04:00
- [Basic pipelines ](pipeline_architectures.md#basic-pipelines ) run everything in each stage concurrently,
followed by the next stage.
- [Directed Acyclic Graph Pipeline (DAG) pipelines ](../directed_acyclic_graph/index.md ) are based on relationships
between jobs and can run more quickly than basic pipelines.
2021-06-30 11:08:27 -04:00
- [Multi-project pipelines ](multi_project_pipelines.md ) combine pipelines for different projects together.
- [Parent-Child pipelines ](parent_child_pipelines.md ) break down complex pipelines
2020-04-10 02:09:41 -04:00
into one parent pipeline that can trigger multiple child sub-pipelines, which all
2021-07-30 23:09:05 -04:00
run in the same project and with the same SHA. This pipeline architecture is commonly used for mono-repos.
2021-06-29 14:07:04 -04:00
- [Pipelines for Merge Requests ](../pipelines/merge_request_pipelines.md ) run for merge
2020-04-10 02:09:41 -04:00
requests only (rather than for every commit).
2021-06-29 14:07:04 -04:00
- [Pipelines for Merged Results ](../pipelines/pipelines_for_merged_results.md )
2020-04-10 02:09:41 -04:00
are merge request pipelines that act as though the changes from the source branch have
already been merged into the target branch.
2021-06-29 14:07:04 -04:00
- [Merge Trains ](../pipelines/merge_trains.md )
2020-04-10 02:09:41 -04:00
use pipelines for merged results to queue merges one after the other.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
## Configure a pipeline
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
Pipelines and their component jobs and stages are defined in the CI/CD pipeline configuration file for each project.
2020-03-13 11:09:21 -04:00
2020-11-15 22:09:03 -05:00
- [Jobs ](../jobs/index.md ) are the basic configuration component.
2021-06-28 17:10:13 -04:00
- Stages are defined by using the [`stages` ](../yaml/index.md#stages ) keyword.
2020-03-13 11:09:21 -04:00
2021-06-28 17:10:13 -04:00
For a list of configuration options in the CI pipeline file, see the [GitLab CI/CD Pipeline Configuration Reference ](../yaml/index.md ).
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
You can also configure specific aspects of your pipelines through the GitLab UI. For example:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
- [Pipeline settings ](settings.md ) for each project.
- [Pipeline schedules ](schedules.md ).
2021-06-28 11:08:03 -04:00
- [Custom CI/CD variables ](../variables/index.md#custom-cicd-variables ).
2020-03-13 11:09:21 -04:00
2020-10-21 11:10:28 -04:00
### Ref Specs for Runners
When a runner picks a pipeline job, GitLab provides that job's metadata. This includes the [Git refspecs ](https://git-scm.com/book/en/v2/Git-Internals-The-Refspec ),
which indicate which ref (branch, tag, and so on) and commit (SHA1) are checked out from your
project repository.
This table lists the refspecs injected for each pipeline type:
| Pipeline type | Refspecs |
|--------------- |---------------------------------------- |
2021-01-14 01:11:16 -05:00
| Pipeline for Branches | `+<sha>:refs/pipelines/<id>` and `+refs/heads/<name>:refs/remotes/origin/<name>` |
| pipeline for Tags | `+<sha>:refs/pipelines/<id>` and `+refs/tags/<name>:refs/tags/<name>` |
2021-06-29 14:07:04 -04:00
| [Pipeline for Merge Requests ](../pipelines/merge_request_pipelines.md ) | `+<sha>:refs/pipelines/<id>` |
2020-10-21 11:10:28 -04:00
The refs `refs/heads/<name>` and `refs/tags/<name>` exist in your
project repository. GitLab generates the special ref `refs/pipelines/<id>` during a
running pipeline job. This ref can be created even after the associated branch or tag has been
2021-03-03 19:11:19 -05:00
deleted. It's therefore useful in some features such as [automatically stopping an environment ](../environments/index.md#stopping-an-environment ),
2021-06-29 14:07:04 -04:00
and [merge trains ](../pipelines/merge_trains.md )
2020-10-21 11:10:28 -04:00
that might run pipelines after branch deletion.
2020-04-10 02:09:41 -04:00
### View pipelines
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
You can find the current and historical pipeline runs under your project's
**CI/CD > Pipelines** page. You can also access pipelines for a merge request by navigating
to its **Pipelines** tab.
2020-03-13 11:09:21 -04:00
2020-05-15 14:07:52 -04:00
![Pipelines index page ](img/pipelines_index_v13_0.png )
2020-03-13 11:09:21 -04:00
2020-08-09 17:10:01 -04:00
Click a pipeline to open the **Pipeline Details** page and show
2020-04-10 02:09:41 -04:00
the jobs that were run for that pipeline. From here you can cancel a running pipeline,
retry jobs on a failed pipeline, or [delete a pipeline ](#delete-a-pipeline ).
2020-03-13 11:09:21 -04:00
2020-05-20 23:08:00 -04:00
[Starting in GitLab 12.3 ](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/50499 ), a link to the
2020-04-10 02:09:41 -04:00
latest pipeline for the last commit of a given branch is available at `/project/pipelines/[branch]/latest` .
2020-08-09 17:10:01 -04:00
Also, `/project/pipelines/latest` redirects you to the latest pipeline for the last commit
2020-04-10 02:09:41 -04:00
on the project's default branch.
2020-03-13 11:09:21 -04:00
2020-05-15 14:07:52 -04:00
[Starting in GitLab 13.0 ](https://gitlab.com/gitlab-org/gitlab/-/issues/215367 ),
you can filter the pipeline list by:
- Trigger author
- Branch name
2020-10-14 20:08:42 -04:00
- Status ([GitLab 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/217617))
- Tag ([GitLab 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/217617))
2020-05-15 14:07:52 -04:00
2020-04-10 02:09:41 -04:00
### Run a pipeline manually
2020-03-13 11:09:21 -04:00
2021-06-28 11:08:03 -04:00
Pipelines can be manually executed, with predefined or manually-specified [variables ](../variables/index.md ).
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
You might do this if the results of a pipeline (for example, a code build) are required outside the normal
operation of the pipeline.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
To execute a pipeline manually:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
1. Navigate to your project's **CI/CD > Pipelines** .
2021-04-09 02:09:30 -04:00
1. Select the **Run pipeline** button.
1. On the **Run pipeline** page:
2021-03-04 07:11:11 -05:00
1. Select the branch or tag to run the pipeline for in the **Run for branch name or tag** field.
2021-06-28 11:08:03 -04:00
1. Enter any [environment variables ](../variables/index.md ) required for the pipeline run.
2021-01-28 07:09:54 -05:00
You can set specific variables to have their [values prefilled in the form ](#prefill-variables-in-manual-pipelines ).
2021-03-04 07:11:11 -05:00
1. Click the **Run pipeline** button.
2020-03-13 11:09:21 -04:00
2020-08-09 17:10:01 -04:00
The pipeline now executes the jobs as configured.
2020-03-13 11:09:21 -04:00
2021-01-28 07:09:54 -05:00
#### Prefill variables in manual pipelines
> [Introduced in](https://gitlab.com/gitlab-org/gitlab/-/issues/30101) GitLab 13.7.
2021-06-28 17:10:13 -04:00
You can use the [`value` and `description` ](../yaml/index.md#prefill-variables-in-manual-pipelines )
2021-05-30 23:10:48 -04:00
keywords to define
2021-06-28 11:08:03 -04:00
[pipeline-level (global) variables ](../variables/index.md#create-a-custom-cicd-variable-in-the-gitlab-ciyml-file )
2021-05-30 23:10:48 -04:00
that are prefilled when running a pipeline manually.
2021-01-28 07:09:54 -05:00
2021-05-30 23:10:48 -04:00
In pipelines triggered manually, the **Run pipelines** page displays all top-level variables
2021-01-28 07:09:54 -05:00
with a `description` and `value` defined in the `.gitlab-ci.yml` file. The values
can then be modified if needed, which overrides the value for that single pipeline run.
The description is displayed below the variable. It can be used to explain what
the variable is used for, what the acceptable values are, and so on:
```yaml
variables:
DEPLOY_ENVIRONMENT:
value: "staging" # Deploy to staging by default
description: "The deployment target. Change this variable to 'canary' or 'production' if needed."
```
2021-05-30 23:10:48 -04:00
You cannot set job-level variables to be pre-filled when you run a pipeline manually.
2020-04-10 02:09:41 -04:00
### Run a pipeline by using a URL query string
2020-03-13 11:09:21 -04:00
2020-05-20 23:08:00 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24146) in GitLab 12.5.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
You can use a query string to pre-populate the **Run Pipeline** page. For example, the query string
2020-08-09 17:10:01 -04:00
`.../pipelines/new?ref=my_branch&var[foo]=bar&file_var[file_foo]=file_bar` pre-populates the
2020-04-10 02:09:41 -04:00
**Run Pipeline** page with:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
- **Run for** field: `my_branch` .
- **Variables** section:
- Variable:
- Key: `foo`
- Value: `bar`
- File:
- Key: `file_foo`
- Value: `file_bar`
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
The format of the `pipelines/new` URL is:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
```plaintext
.../pipelines/new?ref=< branch > & var[< variable_key > ]=< value > & file_var[< file_key > ]=< value >
```
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
The following parameters are supported:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
- `ref` : specify the branch to populate the **Run for** field with.
- `var` : specify a `Variable` variable.
- `file_var` : specify a `File` variable.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
For each `var` or `file_var` , a key and value are required.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
### Add manual interaction to your pipeline
2020-03-13 11:09:21 -04:00
2021-06-28 17:10:13 -04:00
Manual actions, configured using the [`when:manual` ](../yaml/index.md#whenmanual ) keyword,
2020-04-10 02:09:41 -04:00
allow you to require manual interaction before moving forward in the pipeline.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
You can do this straight from the pipeline graph. Just click the play button
to execute that particular job.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
For example, your pipeline might start automatically, but it requires manual action to
2021-03-03 19:11:19 -05:00
[deploy to production ](../environments/index.md#configure-manual-deployments ). In the example below, the `production`
2020-04-10 02:09:41 -04:00
stage has a job with a manual action.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
![Pipelines example ](img/pipelines.png )
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
#### Start multiple manual actions in a stage
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/27188) in GitLab 11.11.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
Multiple manual actions in a single stage can be started at the same time using the "Play all manual" button.
2020-11-09 01:09:23 -05:00
After you click this button, each individual manual action is triggered and refreshed
2020-04-10 02:09:41 -04:00
to an updated status.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
This functionality is only available:
2020-03-13 11:09:21 -04:00
2021-07-08 14:09:32 -04:00
- For users with at least the Developer role.
2020-04-10 02:09:41 -04:00
- If the stage contains [manual actions ](#add-manual-interaction-to-your-pipeline ).
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
### Delete a pipeline
2020-03-13 11:09:21 -04:00
2020-05-20 23:08:00 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24851) in GitLab 12.7.
2020-03-13 11:09:21 -04:00
2021-05-31 14:09:56 -04:00
Users with the [Owner role ](../../user/permissions.md ) in a project can delete a pipeline
2020-04-10 02:09:41 -04:00
by clicking on the pipeline in the **CI/CD > Pipelines** to get to the **Pipeline Details**
page, then using the **Delete** button.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
![Pipeline Delete Button ](img/pipeline-delete.png )
2020-03-13 11:09:21 -04:00
2020-12-04 16:09:29 -05:00
WARNING:
2020-08-09 17:10:01 -04:00
Deleting a pipeline expires all pipeline caches, and deletes all related objects,
2020-04-10 02:09:41 -04:00
such as builds, logs, artifacts, and triggers. **This action cannot be undone.**
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
### Pipeline quotas
2020-03-13 11:09:21 -04:00
Each user has a personal pipeline quota that tracks the usage of shared runners in all personal projects.
2020-09-15 02:09:32 -04:00
Each group has a [usage quota ](../../subscriptions/gitlab_com/index.md#ci-pipeline-minutes ) that tracks the usage of shared runners for all projects created within the group.
2020-03-13 11:09:21 -04:00
When a pipeline is triggered, regardless of who triggered it, the pipeline quota for the project owner's [namespace ](../../user/group/index.md#namespaces ) is used. In this case, the namespace can be the user or group that owns the project.
2020-04-10 02:09:41 -04:00
#### How pipeline duration is calculated
2020-03-13 11:09:21 -04:00
Total running time for a given pipeline excludes retries and pending
(queued) time.
Each job is represented as a `Period` , which consists of:
- `Period#first` (when the job started).
- `Period#last` (when the job finished).
A simple example is:
- A (1, 3)
- B (2, 4)
- C (6, 7)
In the example:
- A begins at 1 and ends at 3.
- B begins at 2 and ends at 4.
- C begins at 6 and ends at 7.
Visually, it can be viewed as:
2020-05-19 23:08:04 -04:00
```plaintext
2020-03-13 11:09:21 -04:00
0 1 2 3 4 5 6 7
AAAAAAA
BBBBBBB
CCCC
```
The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time is:
2020-05-19 23:08:04 -04:00
```plaintext
2020-03-13 11:09:21 -04:00
(4 - 1) + (7 - 6) => 4
```
2020-12-07 04:09:42 -05:00
#### How pipeline quota usage is calculated
Pipeline quota usage is calculated as the sum of the duration of each individual job. This is slightly different to how pipeline _duration_ is [calculated ](#how-pipeline-duration-is-calculated ). Pipeline quota usage doesn't consider any overlap of jobs running in parallel.
For example, a pipeline consists of the following jobs:
- Job A takes 3 minutes.
- Job B takes 3 minutes.
- Job C takes 2 minutes.
The pipeline quota usage is the sum of each job's duration. In this example, 8 runner minutes would be used, calculated as: 3 + 3 + 2.
2020-04-10 02:09:41 -04:00
### Pipeline security on protected branches
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
A strict security model is enforced when pipelines are executed on
[protected branches ](../../user/project/protected_branches.md ).
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
The following actions are allowed on protected branches only if the user is
2021-06-17 08:10:02 -04:00
[allowed to merge or push ](../../user/project/protected_branches.md )
2020-04-10 02:09:41 -04:00
on that specific branch:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
- Run manual pipelines (using the [Web UI ](#run-a-pipeline-manually ) or [pipelines API ](#pipelines-api )).
- Run scheduled pipelines.
- Run pipelines using triggers.
2020-08-04 02:10:16 -04:00
- Run on-demand DAST scan.
2020-04-10 02:09:41 -04:00
- Trigger manual actions on existing pipelines.
- Retry or cancel existing jobs (using the Web UI or pipelines API).
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
**Variables** marked as **protected** are accessible only to jobs that
run on protected branches, preventing untrusted users getting unintended access to
sensitive information like deployment credentials and tokens.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
**Runners** marked as **protected** can run jobs only on protected
branches, preventing untrusted code from executing on the protected runner and
preserving deployment keys and other credentials from being unintentionally
accessed. In order to ensure that jobs intended to be executed on protected
2020-08-09 17:10:01 -04:00
runners do not use regular runners, they must be tagged accordingly.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
## Visualize pipelines
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
Pipelines can be complex structures with many sequential and parallel jobs.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
To make it easier to understand the flow of a pipeline, GitLab has pipeline graphs for viewing pipelines
and their statuses.
2020-03-13 11:09:21 -04:00
2021-04-26 11:10:20 -04:00
Pipeline graphs can be displayed as a large graph or a miniature representation, depending on the page you
2020-04-10 02:09:41 -04:00
access the graph from.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
GitLab capitalizes the stages' names in the pipeline graphs.
2020-03-13 11:09:21 -04:00
2021-04-26 11:10:20 -04:00
### View full pipeline graph
2020-04-10 02:09:41 -04:00
2021-04-26 11:10:20 -04:00
> - [Visualization improvements introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276949) in GitLab 13.11.
2021-04-08 14:09:32 -04:00
2021-04-26 11:10:20 -04:00
The [pipeline details page ](#view-pipelines ) displays the full pipeline graph of
all the jobs in the pipeline.
2020-03-13 11:09:21 -04:00
2021-04-26 11:10:20 -04:00
You can group the jobs by:
- Stage, which arranges jobs in the same stage together in the same column.
![jobs grouped by stage ](img/pipelines_graph_stage_view_v13_12.png )
- [Job dependencies ](#view-job-dependencies-in-the-pipeline-graph ), which arranges
2021-06-28 17:10:13 -04:00
jobs based on their [`needs` ](../yaml/index.md#needs ) dependencies.
2020-03-13 11:09:21 -04:00
2021-06-30 11:08:27 -04:00
[Multi-project pipeline graphs ](multi_project_pipelines.md#multi-project-pipeline-visualization ) help
2020-04-10 02:09:41 -04:00
you visualize the entire pipeline, including all cross-project inter-dependencies. ** (PREMIUM)**
2020-03-13 11:09:21 -04:00
2021-04-26 11:10:20 -04:00
### View job dependencies in the pipeline graph
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/298973) in GitLab 13.12.
> - [Deployed behind a feature flag](../../user/feature_flags.md), disabled by default.
2021-04-30 14:10:09 -04:00
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/328538) in GitLab 13.12.
> - Enabled on GitLab.com.
> - Recommended for production use.
> - To disable in GitLab self-managed instances, ask a GitLab administrator to [disable it](#enable-or-disable-job-dependency-view). **(FREE SELF)**
2021-04-26 11:10:20 -04:00
This in-development feature might not be available for your use. There can be
2021-07-30 14:09:08 -04:00
[risks when enabling features still in development ](../../administration/feature_flags.md#risks-when-enabling-features-still-in-development ).
2021-04-26 11:10:20 -04:00
Refer to this feature's version history for more details.
2021-06-28 17:10:13 -04:00
You can arrange jobs in the pipeline graph based on their [`needs` ](../yaml/index.md#needs )
2021-04-26 11:10:20 -04:00
dependencies.
Jobs in the leftmost column run first, and jobs that depend on them are grouped in the next columns.
For example, `build-job2` depends only on jobs in the first column, so it displays
in the second column from the left. `deploy-job2` depends on jobs in both the first
and second column and displays in the third column:
![jobs grouped by needs dependency ](img/pipelines_graph_dependency_view_v13_12.png )
To add lines that show the `needs` relationships between jobs, select the **Show dependencies** toggle.
These lines are similar to the [needs visualization ](../directed_acyclic_graph/index.md#needs-visualization ):
![jobs grouped by needs dependency with lines displayed ](img/pipelines_graph_dependency_view_links_v13_12.png )
To see the full `needs` dependency tree for a job, hover over it:
![single job dependency tree highlighted ](img/pipelines_graph_dependency_view_hover_v13_12.png )
#### Enable or disable job dependency view **(FREE SELF)**
2021-04-30 14:10:09 -04:00
The job dependency view is deployed behind a feature flag that is **enabled by default** .
2021-04-26 11:10:20 -04:00
[GitLab administrators with access to the GitLab Rails console ](../../administration/feature_flags.md )
2021-04-30 14:10:09 -04:00
can disable it.
2021-04-26 11:10:20 -04:00
To enable it:
```ruby
Feature.enable(:pipeline_graph_layers_view)
```
To disable it:
```ruby
Feature.disable(:pipeline_graph_layers_view)
```
2020-04-10 02:09:41 -04:00
### Pipeline mini graphs
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
Pipeline mini graphs take less space and can tell you at a
quick glance if all jobs passed or something failed. The pipeline mini graph can
be found when you navigate to:
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
- The pipelines index page.
- A single commit page.
- A merge request page.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
Pipeline mini graphs allow you to see all related jobs for a single commit and the net result
of each stage of your pipeline. This allows you to quickly see what failed and
fix it.
2020-03-13 11:09:21 -04:00
2021-04-26 11:10:20 -04:00
Pipeline mini graphs only display jobs by stage.
2020-04-10 02:09:41 -04:00
Stages in pipeline mini graphs are collapsible. Hover your mouse over them and click to expand their jobs.
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
| Mini graph | Mini graph expanded |
|:-------------------------------------------------------------|:---------------------------------------------------------------|
| ![Pipelines mini graph ](img/pipelines_mini_graph_simple.png ) | ![Pipelines mini graph extended ](img/pipelines_mini_graph.png ) |
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
### Pipeline success and duration charts
2020-03-13 11:09:21 -04:00
2021-01-11 16:10:36 -05:00
Pipeline analytics are available on the [**CI/CD Analytics** page ](../../user/analytics/ci_cd_analytics.md#pipeline-success-and-duration-charts ).
2020-04-10 02:09:41 -04:00
### Pipeline badges
Pipeline status and test coverage report badges are available and configurable for each project.
For information on adding pipeline badges to projects, see [Pipeline badges ](settings.md#pipeline-badges ).
2020-03-13 11:09:21 -04:00
2020-04-10 02:09:41 -04:00
## Pipelines API
2020-03-13 11:09:21 -04:00
GitLab provides API endpoints to:
- Perform basic functions. For more information, see [Pipelines API ](../../api/pipelines.md ).
- Maintain pipeline schedules. For more information, see [Pipeline schedules API ](../../api/pipeline_schedules.md ).
- Trigger pipeline runs. For more information, see:
2021-06-28 08:38:12 -04:00
- [Triggering pipelines through the API ](../triggers/index.md ).
2020-03-13 11:09:21 -04:00
- [Pipeline triggers API ](../../api/pipeline_triggers.md ).