Commit f6d8edbf authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs-cicd-enable-style' into 'master'

Update enable/disable CI/CD styling

See merge request gitlab-org/gitlab!67171
parents ee8e6b65 75e668e9
...@@ -166,7 +166,7 @@ Learn how to install, configure, update, and maintain your GitLab instance. ...@@ -166,7 +166,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
## Continuous Integration settings ## Continuous Integration settings
- [Enable/disable GitLab CI/CD](../ci/enable_or_disable_ci.md#site-wide-admin-setting): Enable or disable GitLab CI/CD for your instance. - [Enable/disable GitLab CI/CD](../ci/enable_or_disable_ci.md#make-gitlab-cicd-disabled-by-default-in-new-projects): Enable or disable GitLab CI/CD for your instance.
- [GitLab CI/CD administration settings](../user/admin_area/settings/continuous_integration.md): Enable or disable Auto DevOps site-wide and define the artifacts' max size and expiration time. - [GitLab CI/CD administration settings](../user/admin_area/settings/continuous_integration.md): Enable or disable Auto DevOps site-wide and define the artifacts' max size and expiration time.
- [External Pipeline Validation](external_pipeline_validation.md): Enable, disable, and configure external pipeline validation. - [External Pipeline Validation](external_pipeline_validation.md): Enable, disable, and configure external pipeline validation.
- [Job artifacts](job_artifacts.md): Enable, disable, and configure job artifacts (a set of files and directories which are outputted by a job when it completes successfully). - [Job artifacts](job_artifacts.md): Enable, disable, and configure job artifacts (a set of files and directories which are outputted by a job when it completes successfully).
......
...@@ -19,7 +19,7 @@ If you are using an external CI/CD server like Jenkins or Drone CI, it is advise ...@@ -19,7 +19,7 @@ If you are using an external CI/CD server like Jenkins or Drone CI, it is advise
to disable GitLab CI/CD in order to not have any conflicts with the commits status to disable GitLab CI/CD in order to not have any conflicts with the commits status
API. API.
GitLab CI/CD is exposed via the `/pipelines` and `/jobs` pages of a project. GitLab CI/CD is exposed by using the `/pipelines` and `/jobs` pages of a project.
Disabling GitLab CI/CD in a project does not delete any previous jobs. Disabling GitLab CI/CD in a project does not delete any previous jobs.
In fact, the `/pipelines` and `/jobs` pages can still be accessed, although In fact, the `/pipelines` and `/jobs` pages can still be accessed, although
it's hidden from the left sidebar menu. it's hidden from the left sidebar menu.
...@@ -36,62 +36,68 @@ pipelines that are run from an [external integration](../user/project/integratio ...@@ -36,62 +36,68 @@ pipelines that are run from an [external integration](../user/project/integratio
## Per-project user setting ## Per-project user setting
To enable or disable GitLab CI/CD Pipelines in your project: To enable or disable GitLab CI/CD pipelines in your project:
1. Navigate to **Settings > General > Visibility, project features, permissions**. 1. On the top bar, select **Menu > Projects** and find your project.
1. Expand the **Repository** section 1. On the left sidebar, select **Settings > General**.
1. Enable or disable the **Pipelines** toggle as required. 1. Expand **Visibility, project features, permissions**.
1. In the **Repository** section, turn on or off **Pipelines** as required.
**Project visibility** also affects pipeline visibility. If set to: **Project visibility** also affects pipeline visibility. If set to:
- **Private**: Only project members can access pipelines. - **Private**: Only project members can access pipelines.
- **Internal** or **Public**: Pipelines can be set to either **Only Project Members** - **Internal** or **Public**: Pipelines can be set to either **Only Project Members**
or **Everyone With Access** via the dropdown box. or **Everyone With Access** by using the dropdown box.
Press **Save changes** for the settings to take effect. Press **Save changes** for the settings to take effect.
## Site-wide admin setting ## Make GitLab CI/CD disabled by default in new projects
You can disable GitLab CI/CD site-wide, by modifying the settings in `gitlab.yml` You can set GitLab CI/CD to be disabled by default in all new projects by modifying the settings in:
for source installations, and `gitlab.rb` for Omnibus installations.
Two things to note: - `gitlab.yml` for source installations.
- `gitlab.rb` for Omnibus GitLab installations.
- Disabling GitLab CI/CD affects only newly-created projects. Projects that Existing projects that already had CI/CD enabled are unchanged. Also, this setting only changes
had it enabled prior to this modification work as before. the project default, so project owners can still enable CI/CD in the project settings.
- Even if you disable GitLab CI/CD, users can still enable it in the
project's settings.
For installations from source, open `gitlab.yml` with your editor and set For installations from source:
`builds` to `false`:
```yaml 1. 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 file and restart GitLab: ```yaml
## Default project features settings
default_projects_features:
issues: true
merge_requests: true
wiki: true
snippets: false
builds: false
```
```shell 1. Save the `gitlab.yml` file.
sudo service gitlab restart
```
For Omnibus installations, edit `/etc/gitlab/gitlab.rb` and add the line: 1. Restart GitLab:
```ruby ```shell
gitlab_rails['gitlab_default_projects_features_builds'] = false sudo service gitlab restart
``` ```
Save the file and reconfigure GitLab: For Omnibus GitLab installations:
```shell 1. Edit `/etc/gitlab/gitlab.rb` and add this line:
sudo gitlab-ctl reconfigure
``` ```ruby
gitlab_rails['gitlab_default_projects_features_builds'] = false
```
1. Save the `/etc/gitlab/gitlab.rb` file.
1. Reconfigure GitLab:
```shell
sudo gitlab-ctl reconfigure
```
<!-- ## Troubleshooting <!-- ## Troubleshooting
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment