Skip to content

Enhance the document for review, and lock #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/concepts/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ We generally run `git revert` and merge the code to roll back. But in this proce

**Gitploy provides a quick and easy one-click rollback.** The UI shows a list of completed deployments of which status is `success` when the user selects a runtime environment. And the first option is just the previous deployment.

After that, when the user clicks rollback, Gitploy fetches the payload from the previous deployment and sends a deployment request with the payload to Github. The `ref` from the previous distribution is used in this case. *However, if the ref of the previous deployment is a branch, Gitploy uses SHA to prevent the head of the branch from being deployed.* And `auto_merge: false` is set internally to avoid merge conflicts when rollback.
After that, when the user clicks rollback, Gitploy fetches the payload from the previous deployment and sends a deployment request with the payload to Github. The `ref` from the previous deployment is used in this case. *However, if the ref of the previous deployment is a branch, Gitploy uses SHA to prevent the head of the branch from being deployed.*

*Note that `auto_merge: false` is set internally to avoid merge conflicts when rollback.*

![Rollback](../../static/img/docs/rollback.png)

Expand Down
10 changes: 7 additions & 3 deletions docs/concepts/lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ sidebar_position: 5

# Lock

The worst thing that can happen is someone deploys to the same repository during an incident. The lock helps with this. We provide the locking system to block deployments going out to the environment.
## Locking deployments

You can lock the environment simply by clicking the `LOCK` button in the UI. And if you want to reserve unlock, you can configure the auto-unlock timer.
There are some situations where you may want to block a deployment. If someone else deploys to the same environment while debugging in the production environment, this may worsen the issue. In this case, the locking deployments buy time to resolve the issue as you see fit.

![lock](../../static/img/docs/lock.png)
Gitploy provides locking for each environment. You can use it simply by clicking the 'LOCK' button.

Gitploy also provides automatic unlocking. Generally, users forget to unlock after locking. The auto-unlock provides a function automatically unlocked after a specific time. It can be set to be unlocked after a certain period that requires locking for a certain period, such as canary deployment.

![Lock](../../static/img/docs/lock.png)
24 changes: 10 additions & 14 deletions docs/concepts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@ sidebar_position: 4

# Review

Gitploy has the review to require at least one approval for the deployment. You can list up to reviewers on the configuration file. The reviewers must be logged in and have read permission for the repository.

## Review process

1\. To enable review, you must configure the `review` field first.
## About required review
Users can enable the review in the `deploy.yml` file for each environment, and the users who review are specified here. Reviewers must have at least read permission.

```yaml title="deploy.yml"
envs:
- name: production
review:
enabled: true
reviewers: ["USER_LOGIN1", "USER_LOGIN2"]
reviewers: ["octocat", "dreamer"]
```

2\. When a user deploys in the 'deploy' tab, Gitploy automatically requests a review to reviewers. A reviewer should check what is changed from the latest one.

![Changes](../../static/img/docs/changes.png)
After the review is enabled, reviews are requested when a user deploys. And the deployment waits until a review is approved and has a status of `waiting`. Only one of the required reviewers needs to approve it to proceed. If one rejects it, deployment is not possible. If a deployment is not approved within 30 minutes, it will be automatically canceled.

3\. Finally, a reviewer confirms to approve or reject the deployment, and the `deploy` button will be enabled if a reviewer approves.

*I recommend that a reviewer use the `Approve and Deploy` to let a reviewer acknowledges that the deployment is started.*
The notification will navigate to the deployment page when a review is requested. And when the reviewer presses the 'Review' button on the page, a pop-up shows options for approval and rejection. To approve, click **Approve and Deploy**. After approved, the deployment will proceed (after any deployment protection rules have passed).

![Review](../../static/img/docs/review.png)

## Notification
## Pro Tips

### Confirm Changes
The 'Changes' field at the bottom of the page shows what changes have been made. Reviewers can quickly check what has changed through the commit messages.

Gitploy notifies users when a review is requested or responded to. You can check the [documentation](./notification.md) for the detail.
![Changes](../../static/img/docs/changes.png)
Binary file modified static/img/docs/lock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.