Skip to content

Commit

Permalink
Prod notifications in Slack for CloudBuild activity
Browse files Browse the repository at this point in the history
TODO: set up a new channel, a webhook, and register the webhook as a secret.
  • Loading branch information
mhutchinson committed Feb 21, 2024
1 parent 62bdaea commit 710e664
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
30 changes: 30 additions & 0 deletions deployment/live/cloudbuild/prod/slack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Cloud Build {{.Build.ProjectId}} {{.Build.Id}} {{.Build.Status}}"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "View Build Logs"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Logs"
},
"value": "click_me_123",
"url": "{{.Build.LogUrl}}",
"action_id": "button-action"
}
}
]

5 changes: 3 additions & 2 deletions deployment/live/cloudbuild/prod/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ locals {
inputs = merge(
local.common_vars.locals,
{
env = "prod"
cloud_run_service = "distributor-service-ci"
env = "prod"
cloud_run_service = "distributor-service-ci"
slack_template_json = file("slack.json")
}
)

0 comments on commit 710e664

Please sign in to comment.