Commit aeb60464 authored by Fiona Neill's avatar Fiona Neill

Merge branch 'russell/improve-deployment-approval-docs' into 'master'

Improve deployment approval docs

See merge request gitlab-org/gitlab!82878
parents a7cc1737 48c28e04
...@@ -79,17 +79,25 @@ Maintainer role. ...@@ -79,17 +79,25 @@ Maintainer role.
## Approve or reject a deployment ## Approve or reject a deployment
NOTE: > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/342180/) in GitLab 14.9
This functionality is currently only available through the API. UI is planned for the near future. See [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/342180/).
A blocked deployment is enqueued as soon as it receives the required number of approvals. A single
rejection causes the deployment to fail. The creator of a deployment cannot approve it, even if they
have permission to deploy.
You can approve or reject a deployment to a protected environment either in the UI or using the API:
A blocked deployment is enqueued as soon as it receives the required number of approvals. A single rejection causes the deployment to fail. The creator of a deployment cannot approve it, even if they have permission to deploy. ### Using the UI
1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Deployments > Environments**.
1. In the deployment's row, select **Approval options** (**{thumb-up}**).
1. Select **Approve** or **Reject**.
There are two ways to approve or reject a deployment to a protected environment: ### Using the API
1. Using the [UI](index.md#view-environments-and-deployments): Users who are allowed to deploy to the protected environment can approve or reject a blocked
1. Select **Approval options** (**{thumb-up}**) deployment using the [Deployments API](../../api/deployments.md#approve-or-reject-a-blocked-deployment).
1. Select **Approve** or **Reject**
1. Using the [Deployments API](../../api/deployments.md#approve-or-reject-a-blocked-deployment), users who are allowed to deploy to the protected environment can approve or reject a blocked deployment.
Example: Example:
...@@ -98,16 +106,16 @@ curl --data "status=approved&comment=Looks good to me" \ ...@@ -98,16 +106,16 @@ curl --data "status=approved&comment=Looks good to me" \
--header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/1/approval" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/1/approval"
``` ```
### How to see blocked deployments ## How to see blocked deployments
#### Using the UI ### Using the UI
1. On the top bar, select **Menu > Projects** and find your project. 1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Deployments > Environments**. 1. On the left sidebar, select **Deployments > Environments**.
1. Select the environment being deployed to. 1. Select the environment being deployed to.
1. Look for the `blocked` label. 1. Look for the `blocked` label.
#### Using the API ### Using the API
Use the [Deployments API](../../api/deployments.md) to see deployments. Use the [Deployments API](../../api/deployments.md) to see deployments.
......
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