Skip to content

screwdriver-cd/notifications-email

Repository files navigation

Notifications (Email)

Version Downloads Build Status Open Issues License

Sends email notifications on certain build events.

Usage

npm install screwdriver-notifications-email

Initialization

The class has a variety of knobs to tweak when interacting with Email Notifications.

Parameter Type Description
config Object Configuration Object
config.host String SMTP Host URL
config.port Number Port to use when connecting to SMTP
config.from String Sender email address
config.username String Optional username for SMTP
config.password String Optional password for SMTP

The interface looks for email-specific build data:

Parameter Type Description
buildData Object Build Data Object
buildData.status String Build status update for notification
buildData.settings Object Pluggable settings for each build
buildData.settings.email Object Email-specific settings
buildData.pipelineName String Name of your pipeline
buildData.jobName String Job this email is being sent for
buildData.buildId Number Build number this email is being sent for
buildData.buildLink String Link to build

buildData.settings.email can take either:

Simple Configuration

buildData.settings.email = 'notify.me@email.com'

Advanced Configuration

buildData.settings.email = {
    addresses: ['notify.me@email.com', 'notify.you@email.com'], // Multiple recipient addresses
    statuses: ['SUCCESS', 'FAILURE'] // Build statuses to notify addresses about
}

Testing

npm test

License

Code licensed under the BSD 3-Clause license. See LICENSE file for terms.