Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Add the document for review #203

Merged
merged 1 commit into from
Nov 4, 2021
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
9 changes: 0 additions & 9 deletions docs/concepts/approval.md

This file was deleted.

32 changes: 8 additions & 24 deletions docs/concepts/deploy.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ Gitploy configures a pipeline with a simple, easy‑to‑read file that you comm

## Environments

The configuration file is configured for each environment, respectively. The following example is the fundamental structure of a configuration file.

<details>
<summary>Fundamental structure</summary>
You can configure each environments, respectively. The configuration have to be under the `evns` field. The following example show each environments have different configuration.

```yaml
envs:
Expand All @@ -21,42 +18,29 @@ envs:
- docker-image
```

</details>

## Parameters for Github deployment API
## Parameters of GitHub deployment API

When Gitploy deploys, it posts a new deployment to GitHub [deployments API](https://docs.github.com/en/rest/reference/repos#create-a-deployment) with parameters from the configuration file. The configuration file provides fields to configure all parameters of GitHub deployment API. You can check the [document](../references/deploy.yml.md) for the detail.

<details>
<summary>GitHub parameter field</summary>
Internally, Gitploy posts a deployment to GitHub [deployments API](https://docs.github.com/en/rest/reference/repos#create-a-deployment) with parameters from the configuration file. These parameter help you can verify the artifact before you start to deploy. The configuration file provides fields to configure all parameters of GitHub deployment API. You can check the [document](../references/deploy.yml.md) for the detail.

```yaml
envs:
- name: production
task: deploy:lambda
description: Start to deploy to the production.
description: Start deploying to the production.
auto_merge: false
required_contexts:
- test
- integration-test
production_environment: true
```
## Review

</details>

## Approval

Gitploy provides the approval step to protect to deploy until it matches the required approving approvals.

<details>
<summary>Enable Approval</summary>
Gitploy provides the review process. You can list up to users on the configuration file. You can check the [document](./review.md) for the detail.

```yaml
envs:
- name: production
approval:
review:
enabled: true
required_count: 1
reviewers: ["ocotocat", "noah"]
```

</details>
2 changes: 1 addition & 1 deletion docs/concepts/permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The permission of the repository is determined while Gitploy synchronizes with G

Here are capabilities for each permission:

* **Read** - Users can read all activities that happened in the repository, such as deployments, approvals. And users are also capable of responding to the approval.
* **Read** - Users can read all activities that happened in the repository, such as deployments, reviews. And users are also capable of responding to the review.

* **Write** - Users can lock, deploy, and rollback.

Expand Down
12 changes: 12 additions & 0 deletions docs/concepts/review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Review

Gitploy has the review to require at least one approval for the deployment. You can list up to users on the configuration file. The reviewers must have at least read access to the repository.

```yaml
envs:
- name: production
auto_merge: true
review:
enabled: true
reviewers: ["octocat", "noah"]
```
8 changes: 4 additions & 4 deletions docs/references/deploy.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Field |Type |Required |Description
`required_contexts` |*[]string* |`false` |This field allows you to specify a subset of contexts that must be success.
`payload` |*object* or *string* |`false` |This field is JSON payload with extra information about the deployment.
`production_environment` |*boolean* |`false` |This field specifies whether this runtime environment is production or not.
`approval` |*[Approval](#approval)* |`false` |This field configures approval.
`review` |*[Review](#review)* |`false` |This field configures review.

## Approval
## Review

Field |Type |Tag |Description
--- |--- |--- |---
`enabled` |*boolean* |`true` |This field make to enable the approval feature. The default value is `false`.
`required_count` |*integer* |`false` |This field determine how many the required approving approvals is needs to deploy. The default value is `0`.
`enabled` |*boolean* |`true` |This field make to enable the review feature. The default value is `false`.
`reviewers` |*[]string* |`false` |This field list up reviewers. The default value is `[]`. You should specify maintainers of the project.

## Variables

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ nav:
- "How it works": concepts/how-it-work.md
- "deploy.yml": concepts/deploy.yml.md
- Deployment: concepts/deployment.md
- Approval: concepts/approval.md
- Review: concepts/review.md
- Lock: concepts/lock.md
- Permission: concepts/permission.md
- Chatops: concepts/chatops.md
Expand Down