@@ -9,7 +9,7 @@ you may need to enable pipeline triggering in your project's
...
@@ -9,7 +9,7 @@ you may need to enable pipeline triggering in your project's
## Pipelines
## Pipelines
A pipeline is a group of [jobs][] that get executed in [stages][](batches).
A pipeline is a group of [jobs] that get executed in [stages].
All of the jobs in a stage are executed in parallel (if there are enough
All of the jobs in a stage are executed in parallel (if there are enough
concurrent [Runners]), and if they all succeed, the pipeline moves on to the
concurrent [Runners]), and if they all succeed, the pipeline moves on to the
next stage. If one of the jobs fails, the next stage is not (usually)
next stage. If one of the jobs fails, the next stage is not (usually)
...
@@ -29,17 +29,17 @@ There are three types of pipelines that often use the single shorthand of "pipel
...
@@ -29,17 +29,17 @@ There are three types of pipelines that often use the single shorthand of "pipel
![Types of Pipelines](img/types-of-pipelines.svg)
![Types of Pipelines](img/types-of-pipelines.svg)
1.**CI Pipeline**: Build and test stages defined in `.gitlab-ci.yml`
1.**CI Pipeline**: Build and test stages defined in `.gitlab-ci.yml`.
2.**Deploy Pipeline**: Deploy stage(s) defined in `.gitlab-ci.yml` The flow of deploying code to servers through various stages: e.g. development to staging to production
1.**Deploy Pipeline**: Deploy stage(s) defined in `.gitlab-ci.yml` The flow of deploying code to servers through various stages: e.g. development to staging to production.
3.**Project Pipeline**: Cross-project CI dependencies [triggered via API][triggers], particularly for micro-services, but also for complicated build dependencies: e.g. api -> front-end, ce/ee -> omnibus.
1.**Project Pipeline**: Cross-project CI dependencies [triggered via API][triggers], particularly for micro-services, but also for complicated build dependencies: e.g. api -> front-end, ce/ee -> omnibus.
## Development workflows
## Development workflows
Pipelines accommodate several development workflows:
Pipelines accommodate several development workflows:
1.**Branch Flow** (e.g. different branch for dev, qa, staging, production)
1.**Branch Flow** (e.g. different branch for dev, qa, staging, production).
2.**Trunk-based Flow** (e.g. feature branches and single master branch, possibly with tags for releases)
1.**Trunk-based Flow** (e.g. feature branches and single master branch, possibly with tags for releases).
3.**Fork-based Flow** (e.g. merge requests come from forks)
1.**Fork-based Flow** (e.g. merge requests come from forks).
Example continuous delivery flow:
Example continuous delivery flow:
...
@@ -57,6 +57,16 @@ Pipelines are defined in `.gitlab-ci.yml` by specifying [jobs] that run in
...
@@ -57,6 +57,16 @@ Pipelines are defined in `.gitlab-ci.yml` by specifying [jobs] that run in
See the reference [documentation for jobs](yaml/README.md#jobs).
See the reference [documentation for jobs](yaml/README.md#jobs).
## Manually executing pipelines
Pipelines can be manually executed, with predefined or manually-specified [variables](variables/README.md).
To execute a pipeline manually:
1. Navigate to your project's **CI/CD > Pipelines**.
1. Click on the **Run Pipeline** button.
1. Select the branch to run the pipeline for and enter any environment variables required for the pipeline run.
## Seeing pipeline status
## Seeing pipeline status
You can find the current and historical pipeline runs under your project's
You can find the current and historical pipeline runs under your project's
...
@@ -112,9 +122,9 @@ Then, there is the pipeline mini graph which takes less space and can give you a
...
@@ -112,9 +122,9 @@ Then, there is the pipeline mini graph which takes less space and can give you a
quick glance if all jobs pass or something failed. The pipeline mini graph can
quick glance if all jobs pass or something failed. The pipeline mini graph can
be found when you visit:
be found when you visit:
-the pipelines index page
-The pipelines index page.
-a single commit page
-A single commit page.
-a merge request page
-A merge request page.
That way, you can see all related jobs for a single commit and the net result
That way, you can 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
of each stage of your pipeline. This allows you to quickly see what failed and
...
@@ -142,9 +152,9 @@ jobs. Click to expand them.
...
@@ -142,9 +152,9 @@ jobs. Click to expand them.
The basic requirements is that there are two numbers separated with one of
The basic requirements is that there are two numbers separated with one of
the following (you can even use them interchangeably):
the following (you can even use them interchangeably):
-a space
-A space (` `)
-a slash (`/`)
-A slash (`/`)
-a colon (`:`)
-A colon (`:`)
>**Note:**
>**Note:**
More specifically, [it uses][regexp] this regular expression: `\d+[\s:\/\\]+\d+\s*`.
More specifically, [it uses][regexp] this regular expression: `\d+[\s:\/\\]+\d+\s*`.
...
@@ -257,11 +267,12 @@ A strict security model is enforced when pipelines are executed on
...
@@ -257,11 +267,12 @@ A strict security model is enforced when pipelines are executed on
The following actions are allowed on protected branches only if the user is
The following actions are allowed on protected branches only if the user is
[allowed to merge or push](../user/project/protected_branches.md#using-the-allowed-to-merge-and-allowed-to-push-settings)
[allowed to merge or push](../user/project/protected_branches.md#using-the-allowed-to-merge-and-allowed-to-push-settings)
on that specific branch:
on that specific branch:
- run **manual pipelines** (using Web UI or Pipelines API)
- run **scheduled pipelines**
- Run **manual pipelines** (using [Web UI](#manually-executing-pipelines) or Pipelines API).
- run pipelines using **triggers**
- Run **scheduled pipelines**.
- trigger **manual actions** on existing pipelines
- Run pipelines using **triggers**.
-**retry/cancel** existing jobs (using Web UI or Pipelines API)
- Trigger **manual actions** on existing pipelines.
-**Retry/cancel** existing jobs (using Web UI or Pipelines API).
**Variables** marked as **protected** are accessible only to jobs that
**Variables** marked as **protected** are accessible only to jobs that
run on protected branches, avoiding untrusted users to get unintended access to
run on protected branches, avoiding untrusted users to get unintended access to