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

Send Slack notifications when a change in build status occurs #867

Closed
philipjscott opened this issue Feb 1, 2018 · 0 comments
Closed

Send Slack notifications when a change in build status occurs #867

philipjscott opened this issue Feb 1, 2018 · 0 comments
Labels

Comments

@philipjscott
Copy link
Collaborator

Context

Currently Screwdriver Slack notifications are sent whenever a build returns a status specified in the user's screwdriver.yaml:

settings:
        slack: 
            channels: 
               - channel_A
               - channel_B
           statuses:
               - SUCCESS
               - FAILURE
               - ABORTED
               - QUEUED
               - RUNNING

It would be convenient if users could configure screwdriver.yaml to send a notification whenever a change in build status occurs.

Objective

Add a feature that allows users to get notifications based on a change in build status by modifying screwdriver.yaml.

Suggestion: Users can pass a list of statuses; Screwdriver will keep track of the most recent occurrence of the statuses listed in delta. Each time the build updates its status, we check:

  1. Whether the new status is different from the most recent occurrence
  2. The new status is listed in delta

If both conditions are true, the user will get a notification. Example:

settings:
        slack: 
            channels: 
               - channel_A
               - channel_B
           delta: 
               - SUCCESS
               - FAILURE
               - ABORTED

Consider the following status changes:

RUNNING -> FAILURE -> RUNNING -> FAILURE -> RUNNING -> FAILURE -> RUNNING -> ABORTED -> RUNNING -> SUCCESS -> RUNNING -> SUCCESS

The user would get notifications in this order: FAILURE -> ABORTED -> SUCCESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants