Esempio n. 1
0
// sendFailure sends email notifications to the list of
// recipients indicating the build failed.
func (e *Email) sendFailure(context *Context) error {
	// loop through and email recipients
	for _, email := range e.Recipients {
		if err := mail.SendFailure(context.Repo.Name, context.Commit.HashShort(), email, context); err != nil {
			return err
		}
	}
	return nil
}
Esempio n. 2
0
// sendFailure sends email notifications to the list of
// recipients indicating the build failed.
func (t *BuildTask) sendFailureEmail(c *notification.Context) error {

	// loop through and email recipients
	for _, email := range t.Script.Notifications.Email.Recipients {
		if err := mail.SendFailure(t.Repo.Name, email, c); err != nil {
			return err
		}
	}
	return nil
}