Notifications¶
Get real-time alerts about deployments and builds via Slack.
Overview¶
Versioner can send notifications to Slack channels when events occur:
- Deployment started, completed, or failed
- Build started, completed, or failed
- Deployment rejected by pre-flight checks
Notification Channels¶
A notification channel represents a destination for notifications (currently Slack webhooks).
Creating a Channel¶
CLI Coming Soon
Channel management via CLI is planned. For now, use the API directly.
POST /notification-channels/
{
"name": "Engineering Slack",
"channel_type": "slack_webhook",
"config": {
"webhook_url": "https://hooks.slack.com/services/..."
}
}
Slack Webhook Setup¶
- Go to api.slack.com/apps
- Create a new app or select existing
- Enable "Incoming Webhooks"
- Add webhook to your desired channel
- Copy the webhook URL
- Add to Versioner as a notification channel
Notification Preferences¶
Preferences define which events trigger notifications to which channels.
Configure Preferences¶
POST /notification-preferences/
{
"channel_id": "550e8400-e29b-41d4-a716-446655440000",
"event_type": "deployment.completed",
"filters": {
"environments": ["production"],
"products": ["my-service"]
}
}
Event Types¶
| Event Type | Description |
|---|---|
deployment.pending |
Deployment queued/scheduled |
deployment.started |
Deployment begins |
deployment.completed |
Deployment succeeds |
deployment.failed |
Deployment fails |
deployment.aborted |
Deployment cancelled |
version.started |
Build begins |
version.completed |
Build succeeds |
version.failed |
Build fails |
version.aborted |
Build cancelled |
See Event Types for details.
Filters¶
Narrow down which events trigger notifications:
By Environment:
By Product:
By Status:
Combined:
Slack Message Format¶
Versioner sends rich, formatted messages using Slack's Block Kit:
Deployment Success¶
✅ Deployment Success
Product: my-service
Version: 1.2.3
Environment: production
Deployed by: John Doe
🟢 Success • Completed 30 seconds ago
Deployment Failed¶
❌ Deployment Failed
Product: my-service
Version: 1.2.3
Environment: production
Deployed by: John Doe
Error:
Build Completed¶
✅ Build Completed
Product: my-service
Version: 1.2.3
Built by: github-actions
Branch: main
Commit: abc123d - Fix authentication bug
🟢 Success • Completed 45 seconds ago
Common Configurations¶
Production Deployments Only¶
Get notified about all production deployments:
Failures Everywhere¶
Get notified about failures in any environment:
Specific Product¶
Get notified about a specific product:
Multiple Channels¶
Send different events to different channels:
#deployments channel - All successful deployments:
#alerts channel - Only failures:
Notification History¶
All notifications are tracked in the notification history:
This helps with:
- Debugging notification issues
- Auditing what was sent
- Verifying delivery
Best Practices¶
1. Use Separate Channels¶
Create different Slack channels for different notification types:
- #deployments - All deployments
- #deployment-failures - Only failures
- #production-deployments - Production only
2. Filter Aggressively¶
Avoid notification fatigue by filtering:
✅ Good: - Production failures only - Critical services only - Specific environments
❌ Avoid: - All events to one channel - No filters (too noisy)
3. Test Notifications¶
Test your notification setup:
# Deploy to dev to test notifications
versioner deploy \
--product test-service \
--version 1.0.0 \
--environment dev \
--status success
Troubleshooting¶
Not Receiving Notifications¶
Check:
- Webhook URL is correct
- Slack app has permission to post
- Notification preference is configured
- Event matches your filters
- Check notification history for errors
Duplicate Notifications¶
Problem: Receiving multiple notifications for same event.
Solution: Check for duplicate notification preferences with same filters.
Wrong Channel¶
Problem: Notifications going to wrong Slack channel.
Solution: Verify webhook URL points to correct channel.
Future Enhancements¶
Coming Soon
- Email notifications
- Microsoft Teams integration
- Custom webhooks
- Notification templates
Related Concepts¶
- Deployments - What triggers notifications
- Event Types - All available event types
Next Steps¶
- Set up notification channels via the dashboard
- Configure notification preferences in your account settings
- Learn about Event Types