Ick will need a way to notify users about build failures. Later on, the same notification mechanism can be used for other things, but let's start with the minimal thing that is useful. Here's a sketch.

  • Notifications will be configured in the project resource in the controller.

  • The controller will trigger a notification service to actually send the notification. Don't want to burden the controller with all the details of how notifications are sent, but the controller needs to trigger a notification. (It will do this by telling a worker to do it, so that we don't need to have the controller do blocking HTTP calls to other services.)

  • Notifications will be triggered only on failures. Later on, this needs to be configurable and include options like a "build now succeeds, when it previously failed", and possibly also "always notify".

  • Later on, ick needs to be able to flexibly notify via a number of channels: email, IRC, Matrix, SMS, RSS/Atom, etc. Probably also proprietary systems like Slack will need to be supported. However, we'll start with just email.

  • The notification emails will always be sent with the same sender information, and this will be configured by the sysadmin. Also, it will always be sent with the same mail server, also configured by the sysadmin. Probably using /usr/sbin/sendmail rather than SMTP. Aiming for minimal necessary configuration to start with.

  • The template for the emails will be hard-coded in the source code (for now).

The mails will containt the following information:

  • name of project that was built
  • build number
  • build id
  • log id (for use with icktool)
  • last 1000 lines of build log
  • exit code of build

Later on, this will need to extended, but the above should suffice for now.