Skip to main content
Shield includes a pipeline metrics webhook endpoint designed for services to report CI/CD outcomes. This recipe is aligned with domain/shield/apps/cicd/webhooks.py.

Endpoint

  • POST /api/v1/webhooks/pipeline-metrics/
  • GET /api/v1/webhooks/pipeline-metrics/ (health)

Required fields (minimum)

The implementation requires:
  • service
  • run_id
  • status
Other fields (pipeline name, branch, stages, etc.) are supported and recommended.

Example payload

Send it (signed)

Use the same signature header format as GitHub webhooks:
  • X-Hub-Signature-256: sha256=<hex>
This sends a JSON payload with a GitHub-style HMAC signature header.
To reuse this snippet, set:
  • WEBHOOK_BASE_URL
  • GITHUB_WEBHOOK_SECRET
  • payload (and optionally X-GitHub-Delivery)
Update the snippet as follows:
  • Set the endpoint to POST /api/v1/webhooks/pipeline-metrics/
  • Set X-GitHub-Event: pipeline_metrics
  • Set X-GitHub-Delivery: <run_id>

Expected results

  • 202 or 200 JSON response indicating acceptance.
  • Metrics stored/forwarded according to Shield’s configuration.

Common failures

  • 401 Invalid signature: the secret doesn’t match GITHUB_WEBHOOK_SECRET in Shield.
  • 400 Missing required fields: ensure service, run_id, and status are present.