bedrock
bedrock copied to clipboard
Update Slack notifier for Demos to show more detail
Description
We now have basic Slack notifications of what's happening in Cloud Build (via https://github.com/mozilla/bedrock/issues/11920). However, the detail in them isn't ideal:
While it seems the Cloud Build team are working on supporting templating for notifications, in the meantime we might be able to improve the richness of the notification by making the intermediary Slack App do a bit more work. Specifically:
- Capture the incoming message from the Cloud Build Notifier webhook POST
- Parse it, extracting things like the build ID
- Ping GCP to get things like the branch name or image name for that build - this would tell us which demo site is being built, etc
- Create and post a more useful message to Slack
Success Criteria
- [ ] Slack Notifications for Cloud Build make it explicit which demo site URL or demo branch name the notification refers to, rather than just showing the project ID (which we know) and the build ID (which needs GCP access to go look up)
cc @pmac @bkochendorfer while this walks the line of yak shaving, I think unless we can know for sure whether Cloud Build Notifiers are getting custom templating support soon, this would help us if I do it. (And am happy to!)