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
In this example, we'll trigger anytime a new GitHub release is cut by setting the even type to `release` and using the `json_path` to *exactly* match an `action` of `published`.
| environment_variables | A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build. | list |`<list>`| no |
96
124
| github_oauth_token | GitHub Oauth Token with permissions to access private repositories | string | - | yes |
125
+
| github_webhook_events | A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/). | list |`<list>`| no |
97
126
| image_repo_name | ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)| string |`UNSET`| no |
98
127
| image_tag | Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)| string |`latest`| no |
99
128
| name | Solution name, e.g. 'app' or 'jenkins' | string |`app`| no |
100
129
| namespace | Namespace, which could be your organization name, e.g. 'cp' or 'cloudposse' | string |`global`| no |
101
-
| poll_source_changes | Periodically check the location of your source content and run the pipeline if changes are detected | string |`true`| no |
130
+
| poll_source_changes | Periodically check the location of your source content and run the pipeline if changes are detected | string |`false`| no |
102
131
| privileged_mode | If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images | string |`false`| no |
103
132
| repo_name | GitHub repository name of the application to be built and deployed to ECS. | string | - | yes |
| webhook_authentication | The type of authentication to use. One of IP, GITHUB_HMAC, or UNAUTHENTICATED. | string |`GITHUB_HMAC`| no |
138
+
| webhook_enabled | Set to false to prevent the module from creating any webhook resources | string |`true`| no |
139
+
| webhook_filter_json_path | The JSON path to filter on. | string |`$.ref`| no |
140
+
| webhook_filter_match_equals | The value to match on (e.g. refs/heads/{Branch}) | string |`refs/heads/{Branch}`| no |
141
+
| webhook_target_action | The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline. | string |`Source`| no |
108
142
109
143
## Outputs
110
144
111
145
| Name | Description |
112
146
|------|-------------|
113
147
| badge_url | The URL of the build badge when badge_enabled is enabled |
148
+
| webhook_id | The CodePipeline webhook's ARN. |
149
+
| webhook_url | The CodePipeline webhook's URL. POST events to this endpoint to trigger the target. |
114
150
115
151
116
152
@@ -136,6 +172,14 @@ Check out these related projects.
136
172
137
173
138
174
175
+
176
+
## References
177
+
178
+
For additional context, refer to some of these links.
179
+
180
+
-[aws_codepipeline_webhook](https://www.terraform.io/docs/providers/aws/r/codepipeline_webhook.html) - Provides a CodePipeline Webhook
In this example, we'll trigger anytime a new GitHub release is cut by setting the even type to `release` and using the `json_path` to *exactly* match an `action` of `published`.
| environment_variables | A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build. | list |`<list>`| no |
18
18
| github_oauth_token | GitHub Oauth Token with permissions to access private repositories | string | - | yes |
19
+
| github_webhook_events | A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/). | list |`<list>`| no |
19
20
| image_repo_name | ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)| string |`UNSET`| no |
20
21
| image_tag | Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)| string |`latest`| no |
21
22
| name | Solution name, e.g. 'app' or 'jenkins' | string |`app`| no |
22
23
| namespace | Namespace, which could be your organization name, e.g. 'cp' or 'cloudposse' | string |`global`| no |
23
-
| poll_source_changes | Periodically check the location of your source content and run the pipeline if changes are detected | string |`true`| no |
24
+
| poll_source_changes | Periodically check the location of your source content and run the pipeline if changes are detected | string |`false`| no |
24
25
| privileged_mode | If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images | string |`false`| no |
25
26
| repo_name | GitHub repository name of the application to be built and deployed to ECS. | string | - | yes |
| webhook_authentication | The type of authentication to use. One of IP, GITHUB_HMAC, or UNAUTHENTICATED. | string |`GITHUB_HMAC`| no |
32
+
| webhook_enabled | Set to false to prevent the module from creating any webhook resources | string |`true`| no |
33
+
| webhook_filter_json_path | The JSON path to filter on. | string |`$.ref`| no |
34
+
| webhook_filter_match_equals | The value to match on (e.g. refs/heads/{Branch}) | string |`refs/heads/{Branch}`| no |
35
+
| webhook_target_action | The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline. | string |`Source`| no |
30
36
31
37
## Outputs
32
38
33
39
| Name | Description |
34
40
|------|-------------|
35
41
| badge_url | The URL of the build badge when badge_enabled is enabled |
42
+
| webhook_id | The CodePipeline webhook's ARN. |
43
+
| webhook_url | The CodePipeline webhook's URL. POST events to this endpoint to trigger the target. |
description="GitHub Oauth Token with permissions to access private repositories"
33
33
}
34
34
35
+
variable"github_webhook_events" {
36
+
description="A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)."
37
+
default=["push"]
38
+
}
39
+
35
40
variable"repo_owner" {
36
41
description="GitHub Organization or Username."
37
42
}
@@ -75,7 +80,7 @@ variable "buildspec" {
75
80
# It is recommended you avoid using boolean values and use explicit strings
76
81
variable"poll_source_changes" {
77
82
type="string"
78
-
default="true"
83
+
default="false"
79
84
description="Periodically check the location of your source content and run the pipeline if changes are detected"
description="A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build."
138
143
}
144
+
145
+
variable"webhook_enabled" {
146
+
description="Set to false to prevent the module from creating any webhook resources"
147
+
default="true"
148
+
}
149
+
150
+
variable"webhook_target_action" {
151
+
description="The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline."
152
+
default="Source"
153
+
}
154
+
155
+
variable"webhook_authentication" {
156
+
description="The type of authentication to use. One of IP, GITHUB_HMAC, or UNAUTHENTICATED."
157
+
default="GITHUB_HMAC"
158
+
}
159
+
160
+
variable"webhook_filter_json_path" {
161
+
description="The JSON path to filter on."
162
+
default="$.ref"
163
+
}
164
+
165
+
variable"webhook_filter_match_equals" {
166
+
description="The value to match on (e.g. refs/heads/{Branch})"
0 commit comments