You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/deploy.yml.md
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ envs:
80
80
## Deploy 🚀
81
81
82
82
### Parameters of GitHub deployment API
83
-
As the 'How it works' documentation mentioned, Gitploy sends a request by deployment API. You can configure all the parameters in a configuration file.
83
+
As the 'How it works' documentation mentioned, Gitploy sends a request by [deployment API](https://docs.github.com/en/rest/reference/deployments#deployments). You can configure all the parameters in a configuration file.
84
84
85
85
```yaml title="deploy.yml"
86
86
envs:
@@ -94,3 +94,28 @@ envs:
94
94
production_environment: true
95
95
```
96
96
97
+
### Dynamic Payload
98
+
**This `dynamic_payload` field dynamically generates payload and passes it to the Github deployment API.** This configuration makes deployment systems flexible and powerful. For example, it allows the canary deployment system to set the weight of traffic to shift when triggered.
99
+
100
+
When setting the dynamic payload, when the user presses the deploy button, an input form appears so that the user can enter the payload.
Copy file name to clipboardExpand all lines: docs/references/deploy.yml.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ Field |Type |Required |Description
20
20
`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, we will attempt to merge it for you. Default is `true`, but Gitploy set `false` for rollback. (*Only for GitHub*)
21
21
`required_contexts` |*[]string* |`false` |This field allows you to specify a subset of contexts that must be success. Defaults to all unique contexts. (*Only for GitHub*)
22
22
`payload` |*object* or *string* |`false` |This field is JSON payload with extra information about the deployment. Default is `null`. (*Only for GitHub*)
23
+
`dyanmic_payload` |*[Dynamic Payload](#dynamic-payload)* |`false` |This field dynamically generates JSON payload about the deployment.(*Only for `GitHub`*)
23
24
`production_environment` |*boolean* |`false` |This field specifies whether this runtime environment is production or not. Default is `true`.
24
25
`deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression `re2`.
25
26
`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.*`
@@ -41,6 +42,19 @@ Field |Type |Required |Description
41
42
`duration` |*string* |`true` |This field configures how long the window is frozen from the starting. The duration string is a possibly signed sequence of decimal numbers and a unit suffix such as `5m`, or `1h30m`. Valid time units are `ns`, `us`, `ms`, `s`, `m`, `h`.
42
43
`location` |*string* |`false` |This field configures the location of the `start` time. The value is taken to be a location name corresponding to a file in the IANA Time Zone database, such as `America/New_York`. Default is `UTC`. You can check the [document](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the Time Zone database name.
43
44
45
+
## Dynamic Payload
46
+
47
+
Field |Type |Required |Description
48
+
--- |--- |--- |---
49
+
`enabled` |*boolean* |`true` |This field enables the dynamic payload feature. The default value is `false`.
50
+
`inputs` |*boolean* |`true` |This field set the attributes for the input value.
51
+
`inputs.*.required` |*boolean* |`true` |This field forces a user to input a mandatory value.
52
+
`inputs.*.type` |*string* |`true` |This field specifies the type of the input value. Choose one of the following: `select`, `number`, `string`, and `boolean`.
53
+
`inputs.*.default` |*any* |`false` |This field specifies the default value of the input.
54
+
`inputs.*.description`|*string* |`false` |This field describes the input.
55
+
`inputs.*.options` |*[]string* |`false` |This field specifies options for when the `select` type input.
56
+
57
+
44
58
## Variables
45
59
46
60
The following variables are available in `${ }` syntax when evaluating `deploy.yml` before deploy or rollback:
0 commit comments