Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add result sinks for Telegram, Slack, Email #153

Open
zelenin opened this issue Jan 15, 2018 · 8 comments
Open

Add result sinks for Telegram, Slack, Email #153

zelenin opened this issue Jan 15, 2018 · 8 comments
Assignees
Milestone

Comments

@zelenin
Copy link

zelenin commented Jan 15, 2018

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: 'name@example.com'

- 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'
@dshearer dshearer added this to the 1.4 milestone Jan 27, 2018
@dshearer dshearer added this to To do in Docker support via automation Mar 11, 2018
@dshearer
Copy link
Owner

dshearer commented Mar 11, 2018

How do you feel about using YAML anchors/references? Like this:

[notifySinks]
my_email: &my_email
    provider: 'email'
    params:
        email: 'name@example.com'

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.

@zelenin
Copy link
Author

zelenin commented Mar 11, 2018

I agree with it. It's clear.

@dshearer
Copy link
Owner

dshearer commented Mar 11, 2018

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

@dshearer dshearer changed the title Notification providers Result sinks Mar 11, 2018
@dshearer dshearer changed the title Result sinks Add result sinks for Telegram, Slack, Email Mar 17, 2018
@dshearer dshearer self-assigned this Mar 17, 2018
@dshearer dshearer removed this from To do in Docker support Mar 17, 2018
@s7anley
Copy link

s7anley commented Mar 19, 2018

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!

@dshearer
Copy link
Owner

Yes, this ticket is for providing these implementations. I do plan to do this, but I don't know by when.

@s7anley
Copy link

s7anley commented Mar 22, 2018

I will write simple notifier, for now then. Thanks for the update.

dshearer added a commit that referenced this issue Mar 25, 2018
@techtonik
Copy link
Contributor

Plugins could be nice. Maybe reuse plugins from drone.io http://readme.drone.io/plugins/plugin-overview/

@techtonik
Copy link
Contributor

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.

@dshearer dshearer modified the milestones: 1.4, 1.5 Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants