Sends email notifications on certain build events.
npm install screwdriver-notifications-email
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:
buildData.settings.email = 'notify.me@email.com'
buildData.settings.email = {
addresses: ['notify.me@email.com', 'notify.you@email.com'], // Multiple recipient addresses
statuses: ['SUCCESS', 'FAILURE'] // Build statuses to notify addresses about
}
npm test
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.