
A few examples of known coverage tools for a variety of languages can be found
in the pipelines settings page.
### Removing color codes
Some test coverage tools output with ANSI color codes that won't be
parsed correctly by the regular expression and will cause coverage
parsing to fail.
If your coverage tool doesn't provide an option to disable color
codes in the output, you can pipe the output of the coverage tool through a
small one line script that will strip the color codes off.
For example:
```shell
lein cloverage | perl -pe's/\e\[?.*?[\@-~]//g'
```
## Visibility of pipelines
Pipeline visibility is determined by:
- Your current [user access level](../../user/permissions.md).
- The **Public pipelines** project setting under your project's **Settings > CI/CD > General pipelines**.
NOTE: **Note:**
If the project visibility is set to **Private**, the [**Public pipelines** setting will have no effect](../enable_or_disable_ci.md#per-project-user-setting).
This also determines the visibility of these related features:
- Job output logs
- Job artifacts
- The [pipeline security dashboard](../../user/application_security/security_dashboard/index.md#pipeline-security-dashboard)**(ULTIMATE)**
If **Public pipelines** is enabled (default):
- For **public** projects, anyone can view the pipelines and related features.
- For **internal** projects, any logged in user can view the pipelines
and related features.
- For **private** projects, any project member (guest or higher) can view the pipelines
and related features.
If **Public pipelines** is disabled:
- For **public** projects, anyone can view the pipelines, but only members
(reporter or higher) can access the related features.
- For **internal** projects, any logged in user can view the pipelines.
However, only members (reporter or higher) can access the job related features.
- For **private** projects, only project members (reporter or higher)
can view the pipelines or access the related features.
## Auto-cancel pending pipelines
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/9362) in GitLab 9.1.
If you want all pending non-HEAD pipelines on branches to auto-cancel each time
a new pipeline is created, such as after a Git push or manually from the UI,
you can enable this in the project settings:
1. Go to **{settings}****Settings > CI / CD**.
1. Expand **General Pipelines**.
1. Check the **Auto-cancel redundant, pending pipelines** checkbox.
1. Click **Save changes**.
## Skip older, pending deployment jobs
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/25276) in GitLab 12.9.
Your project may have multiple concurrent deployment jobs that are
scheduled to run within the same time frame.
This can lead to a situation where an older deployment job runs after a
newer one, which may not be what you want.
To avoid this scenario:
1. Go to **{settings}****Settings > CI / CD**.
1. Expand **General pipelines**.
1. Check the **Skip older, pending deployment jobs** checkbox.
1. Click **Save changes**.
The pending deployment jobs will be skipped.
## Pipeline Badges
In the pipelines settings page you can find pipeline status and test coverage
badges for your project. The latest successful pipeline will be used to read
the pipeline status and test coverage values.
Visit the pipelines settings page in your project to see the exact link to
your badges, as well as ways to embed the badge image in your HTML or Markdown
@@ -23,7 +23,7 @@ that you can consider for use in your project. You may want to familiarize
...
@@ -23,7 +23,7 @@ that you can consider for use in your project. You may want to familiarize
yourself with these prior to getting started.
yourself with these prior to getting started.
GitLab offers a [continuous integration](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) service. For each commit or push to trigger your CI
GitLab offers a [continuous integration](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) service. For each commit or push to trigger your CI
[pipeline](../pipelines.md), you must:
[pipeline](../pipelines/index.md), you must:
- Add a [`.gitlab-ci.yml` file](#creating-a-gitlab-ciyml-file) to your repository's root directory.
- Add a [`.gitlab-ci.yml` file](#creating-a-gitlab-ciyml-file) to your repository's root directory.
- Ensure your project is configured to use a [Runner](#configuring-a-runner).
- Ensure your project is configured to use a [Runner](#configuring-a-runner).
@@ -169,7 +169,7 @@ You can either set the variable directly in the `.gitlab-ci.yml`
...
@@ -169,7 +169,7 @@ You can either set the variable directly in the `.gitlab-ci.yml`
file or through the UI.
file or through the UI.
NOTE: **Note:**
NOTE: **Note:**
It is possible to [specify variables when running manual jobs](../pipelines.md#specifying-variables-when-running-manual-jobs).
It is possible to [specify variables when running manual jobs](../pipelines/index.md#specifying-variables-when-running-manual-jobs).
#### Via `.gitlab-ci.yml`
#### Via `.gitlab-ci.yml`
...
@@ -185,14 +185,19 @@ For a deeper look into them, see [`.gitlab-ci.yml` defined variables](#gitlab-ci
...
@@ -185,14 +185,19 @@ For a deeper look into them, see [`.gitlab-ci.yml` defined variables](#gitlab-ci
#### Via the UI
#### Via the UI
From the UI, navigate to your project's **Settings > CI/CD** and
From within the UI, you can add or update custom environment variables:
expand **Variables**. Create a new variable by choosing its **type**, naming
it in the field **Input variable key**, and defining its value in the
**Input variable value** field:

1. Go to your project's **Settings > CI/CD** and expand the **Variables** section.
1. Click the **Add variable** button. In the **Add variable** modal, fill in the details:
You'll also see the option to mask and/or protect your variables.
- **Key**: Must be one line, with no spaces, using only letters, numbers, `-` or `_`.
- **Value**: No limitations.
- **Type**: `File` or `Variable`.
- **Environment scope**: `All`, or specific environments.
- **Protect variable** (Optional): If selected, the variable will only be available in pipelines that run on protected branches or tags.
- **Mask variable** (Optional): If selected, the variable's **Value** will be masked in job logs. The variable will fail to save if the value does not meet the [masking requirements](#masked-variables).
After a variable is created, you can update any of the details by clicking on the **{pencil}****Edit** button.
Once you've set the variables, call them from the `.gitlab-ci.yml` file:
Once you've set the variables, call them from the `.gitlab-ci.yml` file:
...
@@ -460,7 +465,7 @@ limitations with the current Auto DevOps scripting environment.
...
@@ -460,7 +465,7 @@ limitations with the current Auto DevOps scripting environment.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/44059) in GitLab 10.8.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/44059) in GitLab 10.8.
[Manually triggered pipelines](../pipelines.md#manually-executing-pipelines) allow you to override the value of a current variable.
[Manually triggered pipelines](../pipelines/index.md#manually-executing-pipelines) allow you to override the value of a current variable.
GitLab CI/CD [pipelines](../pipelines.md) are configured using a YAML file called `.gitlab-ci.yml` within each project.
GitLab CI/CD [pipelines](../pipelines/index.md) are configured using a YAML file called `.gitlab-ci.yml` within each project.
The `.gitlab-ci.yml` file defines the structure and order of the pipelines and determines:
The `.gitlab-ci.yml` file defines the structure and order of the pipelines and determines:
...
@@ -2735,7 +2735,7 @@ test:
...
@@ -2735,7 +2735,7 @@ test:
```
```
The job-level timeout can exceed the
The job-level timeout can exceed the
[project-level timeout](../../user/project/pipelines/settings.md#timeout) but can not
[project-level timeout](../pipelines/settings.md#timeout) but can not
exceed the Runner-specific timeout.
exceed the Runner-specific timeout.
### `parallel`
### `parallel`
...
@@ -2906,7 +2906,7 @@ starting, at the cost of reduced parallelization.
...
@@ -2906,7 +2906,7 @@ starting, at the cost of reduced parallelization.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/23464) in GitLab 12.3.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/23464) in GitLab 12.3.
`interruptible` is used to indicate that a job should be canceled if made redundant by a newer pipeline run. Defaults to `false`.
`interruptible` is used to indicate that a job should be canceled if made redundant by a newer pipeline run. Defaults to `false`.
This value will only be used if the [automatic cancellation of redundant pipelines feature](../../user/project/pipelines/settings.md#auto-cancel-pending-pipelines)
This value will only be used if the [automatic cancellation of redundant pipelines feature](../pipelines/settings.md#auto-cancel-pending-pipelines)
is enabled.
is enabled.
When enabled, a pipeline on the same branch will be canceled when:
When enabled, a pipeline on the same branch will be canceled when:
GitLab is transitioning from unstructured/plaintext logs to structured/JSON logs. During this transition period some logs will be recorded in multiple formats through multi-destination logging.
GitLab is transitioning from unstructured/plaintext logs to structured/JSON logs. During this transition period some logs will be recorded in multiple formats through multi-destination logging.
**Note:**`with_lock_retries` method **cannot** be used with `disable_ddl_transaction!`.
**Note:**`with_lock_retries` method **cannot** be used with `disable_ddl_transaction!`.
**Note:**`with_lock_retries` method **cannot** be used within the `change` method, you must manually define the `up` and `down` methods to make the migration reversible.
@@ -354,7 +354,7 @@ features, and the instance will be read / write again.
...
@@ -354,7 +354,7 @@ features, and the instance will be read / write again.
## CI pipeline minutes
## CI pipeline minutes
CI pipeline minutes are the execution time for your [pipelines](../ci/pipelines.md) on GitLab's shared runners. Each [GitLab.com tier](https://about.gitlab.com/pricing/) includes a monthly quota of CI pipeline minutes.
CI pipeline minutes are the execution time for your [pipelines](../ci/pipelines/index.md) on GitLab's shared runners. Each [GitLab.com tier](https://about.gitlab.com/pricing/) includes a monthly quota of CI pipeline minutes.
1. Change the value of **maximum artifacts size (in MB)**.
1. Change the value of **maximum artifacts size (in MB)**.
1. Press **Save changes** for the changes to take effect.
1. Press **Save changes** for the changes to take effect.
-[Project level](../../project/pipelines/settings.md)(this will override the instance and group settings):
-[Project level](../../../ci/pipelines/settings.md)(this will override the instance and group settings):
1. Go to the project's **Settings > CI / CD > General Pipelines**.
1. Go to the project's **Settings > CI / CD > General Pipelines**.
1. Change the value of **maximum artifacts size (in MB)**.
1. Change the value of **maximum artifacts size (in MB)**.
...
@@ -152,7 +152,7 @@ Area of your GitLab instance (`.gitlab-ci.yml` if not set):
...
@@ -152,7 +152,7 @@ Area of your GitLab instance (`.gitlab-ci.yml` if not set):
1. Input the new path in the **Default CI configuration path** field.
1. Input the new path in the **Default CI configuration path** field.
1. Hit **Save changes** for the changes to take effect.
1. Hit **Save changes** for the changes to take effect.
It is also possible to specify a [custom CI configuration path for a specific project](../../project/pipelines/settings.md#custom-ci-configuration-path).
It is also possible to specify a [custom CI configuration path for a specific project](../../../ci/pipelines/settings.md#custom-ci-configuration-path).