doc/ci/pipelines/settings.md
{{< details >}}
{{< /details >}}
You can customize how pipelines run for your project.
For public and internal projects, you can change who can see your:
To change the visibility of your pipelines and related features:
In the top bar, select Search or go to and find your project.
Select Settings > CI/CD.
Expand General pipelines.
Select or clear the Project-based pipeline visibility checkbox. When it is selected, pipelines and related features are visible:
When it is cleared:
You can control the visibility of pipelines for non-project members in public projects.
This setting has no effect when:
To change the pipeline visibility for non-project members:
The CI/CD permissions table lists the pipeline features non-project members can access when Everyone With Access is selected.
You can set pending or running pipelines to cancel automatically when a pipeline for new changes runs on the same branch. You can enable this in the project settings:
Use the interruptible keyword to indicate if a
running job can be canceled before it completes. After a job with
interruptible: false starts, the entire pipeline is no longer considered interruptible.
Your project may have multiple concurrent deployment jobs that are scheduled to run in 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:
For more information, see Deployment safety.
{{< details >}}
{{< /details >}}
{{< history >}}
{{< /history >}}
You can customize which roles have permission to cancel pipelines or jobs.
By default, users with the Developer, Maintainer, or Owner role can cancel pipelines or jobs. You can restrict cancellation permission to only users with the Maintainer or Owner role, or completely prevent cancellation of any pipelines or jobs.
To change the permissions to cancel pipelines or jobs:
GitLab expects to find the CI/CD configuration file (.gitlab-ci.yml) in the project's root
directory. However, you can specify an alternate filename path, including locations outside the project.
To customize the path:
[!note] You cannot use your project's pipeline editor to edit CI/CD configuration files in other projects or on an external site.
If the CI/CD configuration file is not in the root directory, the path must be relative to it. For example:
my/path/.gitlab-ci.ymlmy/path/.my-custom-file.ymlIf the CI/CD configuration file is on an external site, the URL must end with .yml:
http://example.com/generate/ci/config.ymlIf the CI/CD configuration file is in a different project:
@ symbol and the full group and project path.For example:
.gitlab-ci.yml@namespace/another-projectmy/path/.my-custom-file.yml@namespace/subgroup/another-projectmy/path/.my-custom-file.yml@namespace/subgroup1/subgroup2/another-project:refnameIf the configuration file is in a separate project, you can set more granular permissions. For example:
Then other users and projects can access the configuration file without being able to edit it.
You can choose how your repository is fetched from GitLab when a job runs.
git clone is slower because it clones the repository from scratch
for every job. However, the local working copy is always pristine.git fetch is faster because it re-uses the local working copy (and falls
back to clone if it doesn't exist). This is recommended, especially for
large repositories.The configured Git strategy can be overridden by the GIT_STRATEGY variable
in the .gitlab-ci.yml file.
You can limit the number of changes that GitLab CI/CD fetches when it clones a repository.
1000. To disable shallow clone and make GitLab CI/CD
fetch all branches and tags each time, keep the value empty or set to 0.Newly created projects have a default git depth value of 20.
This value can be overridden by the GIT_DEPTH variable
in the .gitlab-ci.yml file.
You can define how long a job can run before it times out.
2 hours.
Must be 10 minutes or more, and less than one month. Default is 60 minutes.
Pending jobs are dropped after 24 hours of inactivity.Jobs that exceed the timeout are marked as failed.
When both a project timeout and a runner timeout are set, the lower value takes precedence.
Jobs without an output for one hour are dropped regardless of the timeout. To prevent this from happening, add a script to continuously output progress. For more information, see issue 25359.
You can use pipeline badges to indicate the pipeline status and test coverage of your projects. These badges are determined by the latest successful pipeline.
GitLab CI/CD pipelines are enabled by default on all new projects. If you use an external CI/CD server like Jenkins or Drone CI, you can disable GitLab CI/CD to avoid conflicts with the commits status API.
You can disable GitLab CI/CD per project or for all new projects on an instance.
When you disable GitLab CI/CD:
/pipelines and /jobs pages are no longer available.To disable GitLab CI/CD in your project:
These changes do not apply to projects in an external integration.
{{< details >}}
{{< /details >}}
{{< history >}}
ci_delete_old_pipelines. Disabled by default.ci_delete_old_pipelines removed in GitLab 17.9.{{< /history >}}
Users with the Owner role can set a CI/CD pipeline expiry time to help manage pipeline storage and improve system performance. The system automatically deletes pipelines that were created before the configured value.
2 weeks.
Must be one day or more, and less than one year. Leave empty to never delete pipelines automatically.
Empty by default.For GitLab Self-Managed, administrators can increase the upper limit for automatic pipeline cleanup.