Skip to content

Commit

Permalink
Added conditional webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgatti committed Mar 1, 2020
1 parent 8faf3d3 commit 7ec32c6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 03_Parameters/auto_deploy.json
@@ -0,0 +1,8 @@
{
"AutoDeployParam": {
"Description": "Don't change this unless you forked your own copy of the repos. And want to have auto deployment for changes in code that you made in your repos. If you set Yes, then the CodePipeline setup will get a Webhook resource, otherwise skipped, since you don't have access to our repos, and can't add a web hook entry in our repos.",
"Type": "String",
"AllowedValues" : ["No", "Yes"],
"Default": "No"
}
}
3 changes: 3 additions & 0 deletions 05_Conditions/github_owner.json
@@ -0,0 +1,3 @@
{
"GitHubAutodeploymentCondition": { "Fn::Equals": [ {"Ref": "AutoDeployParam"}, "Yes"] }
}
1 change: 1 addition & 0 deletions 07_Resources/Repos/converter/CodePipeline/webhook.json
@@ -1,6 +1,7 @@
{
"PipelineConverterWebhook": {
"Type": "AWS::CodePipeline::Webhook",
"Condition": "GitHubAutodeploymentCondition",
"Properties": {
"Authentication": "GITHUB_HMAC",
"AuthenticationConfiguration": {
Expand Down
1 change: 1 addition & 0 deletions 07_Resources/Repos/inbound/CodePipeline/webhook.json
@@ -1,6 +1,7 @@
{
"PipelineInboundWebhook": {
"Type": "AWS::CodePipeline::Webhook",
"Condition": "GitHubAutodeploymentCondition",
"Properties": {
"Authentication": "GITHUB_HMAC",
"AuthenticationConfiguration": {
Expand Down
1 change: 1 addition & 0 deletions 07_Resources/Repos/outbound/CodePipeline/webhook.json
@@ -1,6 +1,7 @@
{
"PipelineOutboundWebhook": {
"Type": "AWS::CodePipeline::Webhook",
"Condition": "GitHubAutodeploymentCondition",
"Properties": {
"Authentication": "GITHUB_HMAC",
"AuthenticationConfiguration": {
Expand Down

0 comments on commit 7ec32c6

Please sign in to comment.