YAML for Discord notification
Send a message to a Discord channel via webhook. At least one of content, attachments or file_attachments is required.
YAML examples for Discord notification
Discord notification with attachments
yaml
- action: Discord notification
type: DISCORD2
trigger_time: ON_EVERY_EXECUTION
disabled: false
notification_url: https://discord.com/api/webhooks/123456789/abcdefg
content: |-
**Build Completed**
Commit: `$BUDDY_RUN_COMMIT_SHORT`
Details: $BUDDY_RUN_URL
attachments:
- '{"title": "Build Info", "description": "Details about the build"}'
file_attachments:
- /logs/build.log
- /reports/test-results.xml
ignore_errors: false
retry_interval: 30
retry_count: 2
timeout: 60
Simple Discord notification
yaml
- action: Discord notify
type: DISCORD2
trigger_time: ON_EVERY_EXECUTION
notification_url: https://discord.com/api/webhooks/123/token
content: Build completed successfully