BuildButler

Failure Detection

Configure real-time build failure alerts and root-cause analysis with BuildButler.

BuildButler monitors every build in real time and can alert you within seconds of a failure — before anyone notices the red ball in Jenkins.

How it works

  1. The collector detects a completed build with result != SUCCESS.
  2. It fetches the console log and runs it through the Log Analyzer.
  3. The analyser extracts error signatures (stack traces, exit codes, known patterns).
  4. A notification is dispatched with the failure summary.

Enabling failure alerts

Go to Settings → Alerts → New Rule and configure:

name: Critical Pipeline Failures
trigger: build.failed
filter:
  jobs:
    - "production-*"
    - "release-*"
  branches:
    - main
    - release/*
channels:
  - type: slack
    webhook: https://hooks.slack.com/services/T00/B00/xxxx
  - type: email
    to: devops@example.com
cooldown: 5m   # Don't re-alert for the same job within 5 minutes

Root-cause categories

The log analyser classifies failures into categories:

CategoryExample patterns
Compilationerror TS2304, cannot find symbol, SyntaxError
Test failureFAIL src/, AssertionError, expected X but got Y
Dependencynpm ERR!, Could not resolve dependencies, 401 Unauthorized
InfrastructureOOMKilled, No space left on device, Connection refused
TimeoutBuild timed out, deadline exceeded
FlakyTest passed on retry — BuildButler tracks flaky rate per test

Flaky test tracking

When a job is configured with retry-on-failure, BuildButler compares the test results between the failed and passed runs. Tests that flip between pass and fail are flagged as flaky with a confidence score.

# View the top flaky tests via CLI
buildbutler flaky --top 10
 
# Output
# ┌────┬─────────────────────────────────┬───────────┬───────┐
# │ #  │ Test                            │ Flaky Rate│ Runs  │
# ├────┼─────────────────────────────────┼───────────┼───────┤
# │ 1  │ auth.login.timeout              │ 23.4%     │ 47    │
# │ 2  │ api.orders.concurrent-create    │ 18.1%     │ 83    │
# │ 3  │ ui.dashboard.render-chart       │ 12.7%     │ 55    │
# └────┴─────────────────────────────────┴───────────┴───────┘

Alert channels

BuildButler supports the following notification channels:

  • Slack — via incoming webhook or the BuildButler Slack app
  • Email — SMTP or SendGrid
  • Microsoft Teams — via incoming webhook
  • PagerDuty — incident creation via Events API v2
  • Webhook — generic HTTP POST with JSON payload

See Notifications for detailed setup instructions for each channel.

On this page