Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 1.33 KB

EVENTS.md

File metadata and controls

51 lines (42 loc) · 1.33 KB

Buildkite Events Reference

A quick reference for Buildkite webhook payloads and how to work with them. For a complete list of events, see the Buildkite Webhooks Documentation.

Example Payloads

Ping Event

Sent when testing webhook configuration:

{
  "event": "ping",
  "organization": {
    "id": "123-org-id",
    "name": "Example Org"
  }
}

Build Event

Example of a build.finished event:

{
  "event": "build.finished",
  "build": {
    "id": "01234567-89ab-cdef-0123-456789abcdef",
    "url": "https://api.buildkite.com/v2/organizations/example/pipelines/test/builds/123",
    "web_url": "https://buildkite.com/example/test/builds/123",
    "number": 123,
    "state": "passed",
    "pipeline": "test",
    "organization": "example"
  }
}

Event Filtering

Filter Pub/Sub subscriptions based on event types:

# Failed builds only
gcloud pubsub subscriptions create failed-builds \
  --topic buildkite-events \
  --filter="attributes.event_type = 'build.finished' AND data.build.state = 'failed'"

Additional Resources