Skip to content

Notifications

Noria peut envoyer des notifications webhook ou email lorsqu'un pipeline réussit ou échoue.

Configuration

# noria.yml
notifications:
  on_failure:
    - "https://hooks.slack.com/services/xxx/yyy/zzz"  # webhook Slack
    - "email:ops@mycompany.com"                         # email
  on_success:
    - "https://hooks.slack.com/services/xxx/yyy/zzz"
  timeout_s: 10   # timeout HTTP par appel

Webhook Slack

Le payload envoyé est compatible avec les webhooks entrants Slack :

{
  "pipeline": "mon_pipeline",
  "event": "on_failure",
  "detail": "Run abc123 failed"
}

Pour un message Slack formaté, vous pouvez utiliser un webhook qui transforme ce payload. Alternativement, configurez un service intermédiaire (ex: Zapier, Make) qui reformate vers le format Slack blocks.

Email

Noria utilise smtplib pour envoyer les emails via localhost:25. Configurez un relai SMTP local ou modifiez notifications.py pour pointer vers votre serveur SMTP.

notifications:
  on_failure:
    - "email:data-team@mycompany.com"

Variables d'environnement pour les secrets

Ne mettez jamais les URLs de webhook dans noria.yml en clair. Utilisez .noria/.env :

# .noria/.env (non versionné)
SLACK_WEBHOOK=https://hooks.slack.com/services/xxx/yyy/zzz
# noria.yml
notifications:
  on_failure:
    - "${SLACK_WEBHOOK}"