packages.wenpai.net/deploy/ansible/roles/wppackages/templates/wppackages-pipeline-notify@.service.j2
Ben Word cbb1598733
Add Discord notifications for systemd pipeline failures (#81)
Wire a systemd OnFailure= unit that posts build ID and last 10 lines
of pipeline.log to a Discord webhook when the pipeline exits non-zero.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:14:13 -05:00

10 lines
243 B
Django/Jinja

[Unit]
Description=Discord notification for %i failure
[Service]
Type=oneshot
User=deploy
Group=www-data
EnvironmentFile={{ app_root }}/shared/.env
Environment=NOTIFY_UNIT=%i
ExecStart={{ app_root }}/shared/scripts/notify-pipeline-failure.sh