Add result sinks for Telegram, Slack, Email
Make notification sender (jobbern) with some default providers (email, telegram, slack, webhook etc).
Configuration example:
[prefs]
notifyProgram: jobbern
[notifications]
- my_email:
provider: 'email'
params:
email: '[email protected]'
- my_telegram:
provider: 'telegram'
params:
chat_id: '123456789'
token: 'abcdef123456'
- common_telegram:
provider: 'telegram'
[jobs]
- name: "job#1"
...
notification:
- via: 'my_email'
- via: 'my_telegram'
- via: 'common_telegram'
params:
chat_id: '098765'
token: 'abcdef123456'
How do you feel about using YAML anchors/references? Like this:
[notifySinks]
my_email: &my_email
provider: 'email'
params:
email: '[email protected]'
my_telegram_1: &my_telegram_1
provider: 'telegram'
params:
chat_id: '123456789'
token: 'abcdef123456'
my_telegram_2: &my_telegram_2
provider: 'telegram'
params:
chat_id: '987654'
token: 'abcdef987654'
[jobs]
- name: 'job#1'
...
notifyOnError:
- *my_email
- *my_telegram_1
notifyOnSuccess:
- *my_email
- *my_telegram_2
I'd like to drop the ability to override notify provider params in the job def, in order to reduce complexity.
I agree with it. It's clear.
Actually, I'm thinking of merging #179 into this. We have a notion of "result sink", which is given the result of a run (success/failure), stdout, and stderr, and then does something with it.
(At the same time, I'm thinking of just making the whole jobfile pure YAML.)
See https://github.com/dshearer/jobber/wiki/1.4-Jobfile-Format
Hi @dshearer,
from this discussion, it's not really clear if this is only change of a configuration file, to allow multiple notifications providers or an actual implementation of those providers for defined types e.g. email or telegram.
I'm thinking about replacing cron with jobber, but I'm not sure if I should spend time now on writing own notification program if it will be provided soon.
Thanks!
Yes, this ticket is for providing these implementations. I do plan to do this, but I don't know by when.
I will write simple notifier, for now then. Thanks for the update.
Plugins could be nice. Maybe reuse plugins from drone.io http://readme.drone.io/plugins/plugin-overview/
How do you feel about using YAML anchors/references?
I feel bad about them. Unless you know what are YAML anchors, the format looks too cryptic.