diff --git a/docs/concepts/approval.md b/docs/concepts/approval.md deleted file mode 100644 index 4a6d9c9e..00000000 --- a/docs/concepts/approval.md +++ /dev/null @@ -1,9 +0,0 @@ -# Approval - -Request approvals to commiters who has commited for the deployment. The reviewers must have at least read access to the repository. And you can configure how many reviewers needs to approve. - -For more information, you can check the [document](./deploy.yml.md). - -Figure) Request approval - -![Approval](../images/approval.png) \ No newline at end of file diff --git a/docs/concepts/deploy.yml.md b/docs/concepts/deploy.yml.md index 67ad5b4d..1de65d53 100644 --- a/docs/concepts/deploy.yml.md +++ b/docs/concepts/deploy.yml.md @@ -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. - -
-Fundamental structure +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: @@ -21,42 +18,29 @@ envs: - docker-image ``` -
- -## 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. - -
-GitHub parameter field +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 -
- -## Approval - -Gitploy provides the approval step to protect to deploy until it matches the required approving approvals. - -
-Enable Approval +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"] ``` - -
diff --git a/docs/concepts/permission.md b/docs/concepts/permission.md index 0ccd4fcb..02919a8e 100644 --- a/docs/concepts/permission.md +++ b/docs/concepts/permission.md @@ -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. diff --git a/docs/concepts/review.md b/docs/concepts/review.md new file mode 100644 index 00000000..e4900938 --- /dev/null +++ b/docs/concepts/review.md @@ -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"] +``` diff --git a/docs/references/deploy.yml.md b/docs/references/deploy.yml.md index a8c71e1d..2430eed4 100644 --- a/docs/references/deploy.yml.md +++ b/docs/references/deploy.yml.md @@ -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 diff --git a/mkdocs.yml b/mkdocs.yml index f6fce645..3ec7fb45 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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