Notifications¶
Ginkgo can send Slack notifications for workflow lifecycle events during
ginkgo run.
Supported Channel¶
The current implementation supports Slack incoming webhooks only.
Supported notification events:
run_startedrun_completedrun_failedretry_exhausted
run_completed is the success notification event. run_failed is the terminal
run-level failure notification. retry_exhausted is a task-level notification
sent when a task fails after using all configured retries.
Configure Slack Notifications¶
Add notification settings to ginkgo.toml:
[notifications.slack]
enabled = true
webhook = { env = "GINKGO_SLACK_WEBHOOK" }
events = ["run_started", "run_completed", "run_failed", "retry_exhausted"]
log_tail_lines = 10
max_failed_tasks = 3
Then export the webhook secret before running:
export GINKGO_SLACK_WEBHOOK="https://hooks.slack.com/services/..."
ginkgo run workflow.py
Notes:
webhookmust be provided through the secrets layer as a secret reference.log_tail_linescontrols how many lines of task log tail are included in failure notifications.max_failed_taskscontrols how many failed tasks are summarized in one failure notification.Notification delivery is best-effort. Slack failures log a warning but do not fail the run.
Set Up The Slack Webhook¶
Slack incoming webhooks are configured in Slack, not in Ginkgo.
Create a Slack app for your workspace.
Open the app settings page and go to
Incoming Webhooks.Enable
Activate Incoming Webhooks.Click
Add New Webhook to Workspace.Choose the channel that should receive Ginkgo notifications.
Authorize the app and copy the generated webhook URL.
Store that URL in
GINKGO_SLACK_WEBHOOKbefore running Ginkgo.
For private channels, the Slack app must already be allowed in that channel.
Choosing A Slack Channel¶
Ginkgo does not currently support a channel = ... override in config.
The destination channel is controlled by the Slack webhook itself. If you want
notifications in a different channel, create a webhook for that channel and use
that webhook URL in GINKGO_SLACK_WEBHOOK.