From c1928b7465b36444b32a3a0a186415e4260905e2 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 3 May 2022 23:44:58 +0900 Subject: [PATCH 1/3] Add the document for serialization --- docs/concepts/deploy.yml.md | 9 +++++++++ docs/references/deploy.yml.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/concepts/deploy.yml.md b/docs/concepts/deploy.yml.md index 7a02a39..ba9e887 100644 --- a/docs/concepts/deploy.yml.md +++ b/docs/concepts/deploy.yml.md @@ -66,6 +66,15 @@ envs: location: Asia/Seoul ``` +### Serialization +**Serialization forces only one deployment to run for the same environment.** If deployment is running for a specific environment, users cannot deploy until the deployment is finished. In particular, serialization is helpful in long-running deployment strategies, such as canary deployments, as it prevents other deployments. + +```yaml title="deploy.yml" +envs: + - name: production + serialization: true +``` + ### Review If you require a specific person, such as a service owner or product manager, to review what is deployed before deployment, you can configure the `review` field. You can list up users as reviewers under the `review` field. Then Gitploy requests a review to users by sending a notification when a deployment is triggered. diff --git a/docs/references/deploy.yml.md b/docs/references/deploy.yml.md index cac3636..01dfc3d 100644 --- a/docs/references/deploy.yml.md +++ b/docs/references/deploy.yml.md @@ -23,7 +23,7 @@ Field |Type |Required |Description `production_environment` |*boolean* |`false` |This field specifies whether this runtime environment is production or not. `deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression `re2`. `auto_deploy_on` |*string* |`false` |This field controls auto-deployment behaviour given a ref(branch, SHA, tag). If any new push events are detected on this event, the deployment will be triggered. It supports the regular expression ([re2](https://github.com/google/re2/wiki/Syntax)). E.g. `refs/heads/main` or `refs/tags/v.*` -`review` |*[Review](#review)* |`false` |This field configures reviewers. +`deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression `re2`. `frozen_windows` |*[\][Frozen Window](#frozen-window)* |`false` |This field configures to add a frozen window to prevent unintended deployment for the environment. ## Review From b096facc492bc6bfc5b9f10a8d84244505406581 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 3 May 2022 23:45:48 +0900 Subject: [PATCH 2/3] Embold essential sentence --- docs/concepts/deploy.yml.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/concepts/deploy.yml.md b/docs/concepts/deploy.yml.md index ba9e887..3d39d33 100644 --- a/docs/concepts/deploy.yml.md +++ b/docs/concepts/deploy.yml.md @@ -39,7 +39,7 @@ envs: ### Deployable Ref -The `ref` can be any named branch, tag, or SHA. But sometimes, a `ref` must be specific branches or tags. You can verify a `ref` matched with the format by configuring the `deployable_ref` field. And this configuration also supports a regular expression. +The `ref` can be any named branch, tag, or SHA. But sometimes, a `ref` must be specific branches or tags. **You can verify a `ref` matched with the regular expression** by configuring the `deployable_ref` field. ```yaml title="deploy.yml" envs: @@ -48,7 +48,7 @@ envs: ``` ### Deploy Freeze Window -If you want to prevent deployments for a particular period, such as during a planned vacation period or out of working time, you can configure the `frozen_windows` field. During a deploy freeze period, users can not execute any deployment. +**If you want to prevent deployments for a particular period**, such as during a planned vacation period or out of working time, you can configure the `frozen_windows` field. During a deploy freeze period, users can not execute any deployment. And this configuration uses the cron expression to handle repetitive periods. You can check the detail in the [documentation](../references/deploy.yml.md). @@ -76,7 +76,7 @@ envs: ``` ### Review -If you require a specific person, such as a service owner or product manager, to review what is deployed before deployment, you can configure the `review` field. You can list up users as reviewers under the `review` field. Then Gitploy requests a review to users by sending a notification when a deployment is triggered. +**If you require a specific person, such as a service owner or product manager, to review what is deployed before deployment**, you can configure the `review` field. You can list up users as reviewers under the `review` field. Then Gitploy requests a review to users by sending a notification when a deployment is triggered. ```yaml title="deploy.yml" envs: From f52a794198b4c8cf4fd93a402c6c749a47f1674a Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 3 May 2022 23:46:40 +0900 Subject: [PATCH 3/3] Reorder the fields of 'deploy.yml' --- docs/references/deploy.yml.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/references/deploy.yml.md b/docs/references/deploy.yml.md index 01dfc3d..4d1217a 100644 --- a/docs/references/deploy.yml.md +++ b/docs/references/deploy.yml.md @@ -15,16 +15,17 @@ Field |Type |Required |Description Field |Type |Required |Description --- |---- |--- |--- `name` |*string* |`true` |This field is the runtime environment such as `production`, `staging`, and `qa`. -`task` |*string* |`false` |This field is used by the deployment system to distinguish the kind of deployment. (*Only for `GitHub`*) -`description` |*string* |`false` |This field is the short description of the deployment. (*Only for `GitHub`*) -`auto_merge` |*boolean* |`false` |This field is used to ensure that the requested ref is not behind the repository's default branch. If you deploy with the commit or the tag you need to set `false`. For rollback, Gitploy set the field `false`. (*Only for `GitHub`*) -`required_contexts` |*[]string* |`false` |This field allows you to specify a subset of contexts that must be success. (*Only for `GitHub`*) -`payload` |*object* or *string* |`false` |This field is JSON payload with extra information about the deployment. (*Only for `GitHub`*) +`task` |*string* |`false` |This field is used by the deployment system to distinguish the kind of deployment. (*Only for GitHub*) +`description` |*string* |`false` |This field is the short description of the deployment. (*Only for GitHub*) +`auto_merge` |*boolean* |`false` |This field is used to ensure that the requested ref is not behind the repository's default branch. If the ref is behind the default branch for the repository, GitHub will attempt to merge it for you. For rollback, Gitploy set the field `false` internally. The default value is `true`. (*Only for GitHub*) +`required_contexts` |*[]string* |`false` |This field allows you to specify a subset of contexts that must be success. (*Only for GitHub*) +`payload` |*object* or *string* |`false` |This field is JSON payload with extra information about the deployment. (*Only for GitHub*) `production_environment` |*boolean* |`false` |This field specifies whether this runtime environment is production or not. -`deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression `re2`. `auto_deploy_on` |*string* |`false` |This field controls auto-deployment behaviour given a ref(branch, SHA, tag). If any new push events are detected on this event, the deployment will be triggered. It supports the regular expression ([re2](https://github.com/google/re2/wiki/Syntax)). E.g. `refs/heads/main` or `refs/tags/v.*` `deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression `re2`. `frozen_windows` |*[\][Frozen Window](#frozen-window)* |`false` |This field configures to add a frozen window to prevent unintended deployment for the environment. +`serialization` |*boolean* |`false` |This field forces only one deployment to run for the environment. +`review` |*[Review](#review)* |`false` |This field configures reviewers. ## Review