Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-05 18:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-05 18:08:48 +0300
commiteabf8fd774fef6a54903e5141138f47bdafeb331 (patch)
treec74ff99fa6765cbe091767e9827374ce44b0df50 /doc
parent20d564f1064622ef0623434372ac3ceb03173331 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/monitoring/gitlab_self_monitoring_project/index.md13
-rw-r--r--doc/api/api_resources.md1
-rw-r--r--doc/api/protected_environments.md136
-rw-r--r--doc/user/application_security/container_scanning/index.md2
-rw-r--r--doc/user/application_security/dast/index.md14
-rw-r--r--doc/user/application_security/dependency_scanning/index.md8
-rw-r--r--doc/user/application_security/license_compliance/index.md14
-rw-r--r--doc/user/application_security/sast/analyzers.md8
-rw-r--r--doc/user/application_security/sast/index.md2
9 files changed, 173 insertions, 25 deletions
diff --git a/doc/administration/monitoring/gitlab_self_monitoring_project/index.md b/doc/administration/monitoring/gitlab_self_monitoring_project/index.md
index 82944d10d52..df109b94d2d 100644
--- a/doc/administration/monitoring/gitlab_self_monitoring_project/index.md
+++ b/doc/administration/monitoring/gitlab_self_monitoring_project/index.md
@@ -17,7 +17,18 @@ All administrators at the time of creation of the project and group will be adde
as maintainers of the group and project, and as an admin, you'll be able to add new
members to the group in order to give them maintainer access to the project.
-This project will be used for self-monitoring your GitLab instance.
+This project will be used for self monitoring your GitLab instance.
+
+## Activating or deactivating the self monitoring project
+
+1. Navigate to **Admin Area > Settings > Metrics and profiling** and expand the **Self monitoring** section.
+1. Toggle on or off the **Create Project** button to create or remove the "GitLab self monitoring" project.
+1. Click **Save changes** for the changes to take effect.
+
+If you activated the monitoring project, it should now be visible in **Projects > Your projects**.
+
+CAUTION: **Warning:**
+If you deactivate the self monitoring project, it will be permanently deleted.
## Connection to Prometheus
diff --git a/doc/api/api_resources.md b/doc/api/api_resources.md
index 6eba9bf23bf..2adc0087474 100644
--- a/doc/api/api_resources.md
+++ b/doc/api/api_resources.md
@@ -56,6 +56,7 @@ The following API resources are available in the project context:
| [Project milestones](milestones.md) | `/projects/:id/milestones` |
| [Project snippets](project_snippets.md) | `/projects/:id/snippets` |
| [Project templates](project_templates.md) | `/projects/:id/templates` |
+| [Protected_environments](protected_environments.md) | `/projects/:id/protected_environments` |
| [Protected branches](protected_branches.md) | `/projects/:id/protected_branches` |
| [Protected tags](protected_tags.md) | `/projects/:id/protected_tags` |
| [Releases](releases/index.md) | `/projects/:id/releases` |
diff --git a/doc/api/protected_environments.md b/doc/api/protected_environments.md
new file mode 100644
index 00000000000..7d4e62a8ff5
--- /dev/null
+++ b/doc/api/protected_environments.md
@@ -0,0 +1,136 @@
+# Protected environments API **(PREMIUM)**
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/30595) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.8.
+
+## Valid access levels
+
+The access levels are defined in the `ProtectedEnvironment::DeployAccessLevel::ALLOWED_ACCESS_LEVELS` method.
+Currently, these levels are recognized:
+
+```
+30 => Developer access
+40 => Maintainer access
+60 => Admin access
+```
+
+## List protected environments
+
+Gets a list of protected environments from a project:
+
+```bash
+GET /projects/:id/protected_environments
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. |
+
+```bash
+curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments/'
+```
+
+Example response:
+
+```json
+[
+ {
+ "name":"production",
+ "deploy_access_levels":[
+ {
+ "access_level":40,
+ "access_level_description":"Maintainers",
+ "user_id":null,
+ "group_id":null
+ }
+ ]
+ }
+]
+```
+
+## Get a single protected environment
+
+Gets a single protected environment:
+
+```bash
+GET /projects/:id/protected_environments/:name
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `name` | string | yes | The name of the protected environment |
+
+```bash
+curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments/production'
+```
+
+Example response:
+
+```json
+{
+ "name":"production",
+ "deploy_access_levels":[
+ {
+ "access_level":40,
+ "access_level_description":"Maintainers",
+ "user_id":null,
+ "group_id":null
+ }
+ ]
+}
+```
+
+## Protect repository environments
+
+Protects a single environment:
+
+```bash
+POST /projects/:id/protected_environments
+```
+
+```bash
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments?name=staging&deploy_access_levels%5B%5D%5Buser_id%5D=1'
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. |
+| `name` | string | yes | The name of the environment. |
+| `deploy_access_levels` | array | yes | Array of access levels allowed to deploy, with each described by a hash. |
+
+Elements in the `deploy_access_levels` array should take the
+form `{user_id: integer}`, `{group_id: integer}` or `{access_level: integer}`.
+Each user must have access to the project and each group must [have this project shared](../user/project/members/share_project_with_groups.md).
+
+Example response:
+
+```json
+{
+ "name":"staging",
+ "deploy_access_levels":[
+ {
+ "access_level":null,
+ "access_level_description":"Administrator",
+ "user_id":1,
+ "group_id":null
+ }
+ ]
+}
+```
+
+## Unprotect environment
+
+Unprotects the given protected environment:
+
+```bash
+DELETE /projects/:id/protected_environments/:name
+```
+
+```bash
+curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments/staging'
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. |
+| `name` | string | yes | The name of the protected environment. |
diff --git a/doc/user/application_security/container_scanning/index.md b/doc/user/application_security/container_scanning/index.md
index 25a6c21ac39..b5d11f36080 100644
--- a/doc/user/application_security/container_scanning/index.md
+++ b/doc/user/application_security/container_scanning/index.md
@@ -85,7 +85,7 @@ Add the following to your `.gitlab-ci.yml` file:
```yaml
include:
- template: Container-Scanning.gitlab-ci.yml
+ - template: Container-Scanning.gitlab-ci.yml
```
The included template will:
diff --git a/doc/user/application_security/dast/index.md b/doc/user/application_security/dast/index.md
index 7e318a47f4d..a96a17aa45a 100644
--- a/doc/user/application_security/dast/index.md
+++ b/doc/user/application_security/dast/index.md
@@ -71,7 +71,7 @@ Add the following to your `.gitlab-ci.yml` file:
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
variables:
DAST_WEBSITE: https://example.com
@@ -111,7 +111,7 @@ It's also possible to authenticate the user before performing the DAST checks:
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
variables:
DAST_WEBSITE: https://example.com
@@ -135,7 +135,7 @@ includes both passive and active scanning against the same target website:
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
variables:
DAST_FULL_SCAN_ENABLED: "true"
@@ -151,7 +151,7 @@ Domain validation is not required by default. It can be required by setting the
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
variables:
DAST_FULL_SCAN_ENABLED: "true"
@@ -260,7 +260,7 @@ For example:
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
variables:
DAST_WEBSITE: https://example.com
@@ -278,7 +278,7 @@ template inclusion and specify any additional keys under it. For example:
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
dast:
stage: dast # IMPORTANT: don't forget to add this
@@ -447,7 +447,7 @@ for DAST by overwriting the `script` key in the DAST template:
```yaml
include:
- template: DAST.gitlab-ci.yml
+ - template: DAST.gitlab-ci.yml
dast:
script:
diff --git a/doc/user/application_security/dependency_scanning/index.md b/doc/user/application_security/dependency_scanning/index.md
index 3f725089932..24cf7906848 100644
--- a/doc/user/application_security/dependency_scanning/index.md
+++ b/doc/user/application_security/dependency_scanning/index.md
@@ -79,7 +79,7 @@ Add the following to your `.gitlab-ci.yml` file:
```yaml
include:
- template: Dependency-Scanning.gitlab-ci.yml
+ - template: Dependency-Scanning.gitlab-ci.yml
```
The included template will create a `dependency_scanning` job in your CI/CD
@@ -99,7 +99,7 @@ For example:
```yaml
include:
- template: Dependency-Scanning.gitlab-ci.yml
+ - template: Dependency-Scanning.gitlab-ci.yml
variables:
DS_PYTHON_VERSION: 2
@@ -116,7 +116,7 @@ after the template inclusion and specify any additional keys under it. For examp
```yaml
include:
- template: Dependency-Scanning.gitlab-ci.yml
+ - template: Dependency-Scanning.gitlab-ci.yml
dependency_scanning:
variables:
@@ -187,7 +187,7 @@ This does not require running the executor in privileged mode. For example:
```yaml
include:
- template: Dependency-Scanning.gitlab-ci.yml
+ - template: Dependency-Scanning.gitlab-ci.yml
variables:
DS_DISABLE_DIND: "true"
diff --git a/doc/user/application_security/license_compliance/index.md b/doc/user/application_security/license_compliance/index.md
index 95eec0db7fa..f70c654413e 100644
--- a/doc/user/application_security/license_compliance/index.md
+++ b/doc/user/application_security/license_compliance/index.md
@@ -88,7 +88,7 @@ Add the following to your `.gitlab-ci.yml` file:
```yaml
include:
- template: License-Scanning.gitlab-ci.yml
+ - template: License-Scanning.gitlab-ci.yml
```
The included template will create a `license_scanning` job in your CI/CD pipeline
@@ -141,7 +141,7 @@ For example:
```yaml
include:
- template: License-Scanning.gitlab-ci.yml
+ - template: License-Scanning.gitlab-ci.yml
variables:
LICENSE_MANAGEMENT_SETUP_CMD: sh my-custom-install-script.sh
@@ -158,7 +158,7 @@ after the template inclusion and specify any additional keys under it. For examp
```yaml
include:
- template: License-Scanning.gitlab-ci.yml
+ - template: License-Scanning.gitlab-ci.yml
license_scanning:
variables:
@@ -173,7 +173,7 @@ Feel free to use it for the customization of Maven execution. For example:
```yaml
include:
- template: License-Scanning.gitlab-ci.yml
+ - template: License-Scanning.gitlab-ci.yml
license_scanning:
variables:
@@ -201,7 +201,7 @@ by setting the `LM_PYTHON_VERSION` environment variable to `2`.
```yaml
include:
- template: License-Scanning.gitlab-ci.yml
+ - template: License-Scanning.gitlab-ci.yml
license_scanning:
variables:
@@ -223,7 +223,7 @@ For example, the following `.gitlab-ci.yml`:
```yaml
include:
- template: License-Management.gitlab-ci.yml
+ - template: License-Management.gitlab-ci.yml
license_management:
artifacts:
@@ -235,7 +235,7 @@ Should be changed to:
```yaml
include:
- template: License-Scanning.gitlab-ci.yml
+ - template: License-Scanning.gitlab-ci.yml
license_scanning:
artifacts:
diff --git a/doc/user/application_security/sast/analyzers.md b/doc/user/application_security/sast/analyzers.md
index a42cf7f09ff..c27c61a52e2 100644
--- a/doc/user/application_security/sast/analyzers.md
+++ b/doc/user/application_security/sast/analyzers.md
@@ -49,7 +49,7 @@ In `.gitlab-ci.yml` define:
```yaml
include:
- template: SAST.gitlab-ci.yml
+ - template: SAST.gitlab-ci.yml
variables:
SAST_ANALYZER_IMAGE_PREFIX: my-docker-registry/gl-images
@@ -66,7 +66,7 @@ In `.gitlab-ci.yml` define:
```yaml
include:
- template: SAST.gitlab-ci.yml
+ - template: SAST.gitlab-ci.yml
variables:
SAST_DEFAULT_ANALYZERS: "bandit,flawfinder"
@@ -82,7 +82,7 @@ default analyzers. In `.gitlab-ci.yml` define:
```yaml
include:
- template: SAST.gitlab-ci.yml
+ - template: SAST.gitlab-ci.yml
variables:
SAST_DEFAULT_ANALYZERS: ""
@@ -98,7 +98,7 @@ In `.gitlab-ci.yml` define:
```yaml
include:
- template: SAST.gitlab-ci.yml
+ - template: SAST.gitlab-ci.yml
variables:
SAST_ANALYZER_IMAGES: "my-docker-registry/analyzers/csharp,amy-docker-registry/analyzers/perl"
diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md
index 24f28e547b3..ea9c0b85bea 100644
--- a/doc/user/application_security/sast/index.md
+++ b/doc/user/application_security/sast/index.md
@@ -225,7 +225,7 @@ stages:
- test
include:
- template: SAST.gitlab-ci.yml
+ - template: SAST.gitlab-ci.yml
variables:
SAST_DISABLE_DIND: "true"