doc/administration/cicd/_index.md
{{< details >}}
{{< /details >}}
GitLab administrators can manage the GitLab CI/CD configuration for their instance.
GitLab CI/CD is enabled by default in all new projects on an instance. You can set CI/CD to be disabled by default in new projects by modifying the settings in:
gitlab.yml for self-compiled installations.gitlab.rb for Linux package installations.Existing projects that already had CI/CD enabled are unchanged. Also, this setting only changes the project default, so project owners can still enable CI/CD in the project settings.
For self-compiled installations:
Open gitlab.yml with your editor and set builds to false:
## Default project features settings
default_projects_features:
issues: true
merge_requests: true
wiki: true
snippets: false
builds: false
Save the gitlab.yml file.
Restart GitLab:
sudo service gitlab restart
For Linux package installations:
Edit /etc/gitlab/gitlab.rb and add this line:
gitlab_rails['gitlab_default_projects_features_builds'] = false
Save the /etc/gitlab/gitlab.rb file.
Reconfigure GitLab:
sudo gitlab-ctl reconfigure
You can disable some important but computationally expensive parts of the application to relieve stress on the database during ongoing downtime.
When clearing a large backlog of jobs, you can temporarily enable the ci_queueing_disaster_recovery_disable_fair_scheduling
feature flag. This flag disables fair scheduling
on instance runners, which reduces system resource usage on the jobs/request endpoint.
When enabled, jobs are processed in the order they were put in the system, instead of balanced across many projects.
To disable the enforcement of compute minutes quotas on instance runners, you can temporarily
enable the ci_queueing_disaster_recovery_disable_quota feature flag.
This flag reduces system resource usage on the jobs/request endpoint.
When enabled, jobs created in the last hour can run in projects which are out of quota.
Earlier jobs are already canceled by a periodic background worker (StuckCiJobsWorker).