I'm looking for an option to monitor and create alerts whenever a Cloud Build fail - using Stackdriver.
Lots of people are solving this using Pub/Sub and Cloud Functions (example) but I perfer to have all monitoring/alerting within Stackdriver. Stackdriver does have a Resource type named Cloud Build
but there are no Metrics
that makes any sense in terms of detecting a failed build. I'm guessing this is a missing feature?
Second option would be to analyze GCP logs (Log Viewer) and trigger an alert based on those events instead. The logs are there, but how can I utilize them inside Stackdriver?