Commit 43b3f795 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 5c0d0dfb fa288857
...@@ -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
......
...@@ -53,7 +53,7 @@ Pipelines can be configured in many different ways: ...@@ -53,7 +53,7 @@ Pipelines can be configured in many different ways:
- [Multi-project pipelines](multi_project_pipelines.md) combine pipelines for different projects together. - [Multi-project pipelines](multi_project_pipelines.md) combine pipelines for different projects together.
- [Parent-Child pipelines](parent_child_pipelines.md) break down complex pipelines - [Parent-Child pipelines](parent_child_pipelines.md) break down complex pipelines
into one parent pipeline that can trigger multiple child sub-pipelines, which all into one parent pipeline that can trigger multiple child sub-pipelines, which all
run in the same project and with the same SHA. run in the same project and with the same SHA. This pipeline architecture is commonly used for mono-repos.
- [Pipelines for Merge Requests](../pipelines/merge_request_pipelines.md) run for merge - [Pipelines for Merge Requests](../pipelines/merge_request_pipelines.md) run for merge
requests only (rather than for every commit). requests only (rather than for every commit).
- [Pipelines for Merged Results](../pipelines/pipelines_for_merged_results.md) - [Pipelines for Merged Results](../pipelines/pipelines_for_merged_results.md)
......
...@@ -16,8 +16,8 @@ changes are pushed to a branch. ...@@ -16,8 +16,8 @@ changes are pushed to a branch.
If you want the pipeline to run jobs **only** on commits associated with a merge request, If you want the pipeline to run jobs **only** on commits associated with a merge request,
you can use *pipelines for merge requests*. you can use *pipelines for merge requests*.
In the UI, these pipelines are labeled as `detached`. Otherwise, these pipelines are the same These pipelines are labeled as `detached` in the UI, and they do not have access to [protected variables](../variables/index.md#protect-a-cicd-variable).
as other pipelines. Otherwise, these pipelines are the same as other pipelines.
Pipelines for merge requests can run when you: Pipelines for merge requests can run when you:
......
...@@ -317,6 +317,9 @@ You can protect a project, group or instance CI/CD variable so it is only passed ...@@ -317,6 +317,9 @@ You can protect a project, group or instance CI/CD variable so it is only passed
to pipelines running on [protected branches](../../user/project/protected_branches.md) to pipelines running on [protected branches](../../user/project/protected_branches.md)
or [protected tags](../../user/project/protected_tags.md). or [protected tags](../../user/project/protected_tags.md).
[Pipelines for merge requests](../pipelines/merge_request_pipelines.md) do not have access to protected variables.
An [issue exists](https://gitlab.com/gitlab-org/gitlab/-/issues/28002) regarding this limitation.
To protect a variable: To protect a variable:
1. Go to **Settings > CI/CD** in the project, group or instance admin area. 1. Go to **Settings > CI/CD** in the project, group or instance admin area.
......
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