From e8e097dcd98639f3b60664751736b7c0c3c4629e Mon Sep 17 00:00:00 2001 From: "H. tktk" Date: Thu, 9 Nov 2017 09:15:05 +0900 Subject: [PATCH] docs(775): update notifications plugin docs including scoped package (#122) * docs(775): update notifications plugin docs including scoped package * fix typo --- docs/cluster-management/configure-api.md | 37 ++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/docs/cluster-management/configure-api.md b/docs/cluster-management/configure-api.md index fd031a5a..545a3fb0 100644 --- a/docs/cluster-management/configure-api.md +++ b/docs/cluster-management/configure-api.md @@ -208,8 +208,10 @@ executor: socketPath: /var/lib/docker.sock launchVersion: stable ``` +### Notifications Plugin +We currently support [Email notifications](https://github.com/screwdriver-cd/notifications-email). -### Email Notifications +#### Email Notifications Configure the SMTP server and sender address that email notifications will be sent from. @@ -222,7 +224,38 @@ notifications: from: example@email.com ``` -Configurable authentication settings have not yet been built, but can easily be added. We’re using the nodemailer package to power emails, so authentication features will be similar to any typical nodemailer setup. Contribute at: https://github.com/screwdriver-cd/notifications-email +Configurable authentication settings have not yet been built, but can easily be added. We’re using the [nodemailer](https://nodemailer.com/about/) package to power emails, so authentication features will be similar to any typical nodemailer setup. Contribute at: [screwdriver-cd/notifications-email](https://github.com/screwdriver-cd/notifications-email) + +#### Custom Notifications + +You can create custom notification packages by extending [notifications-base](https://github.com/screwdriver-cd/notifications-base). +The format of the package name must be `screwdriver-notifications-`. + +The following is an example snippet of `local.yaml` configuration when you use email notification and your custom notification: + +```yaml +# config/local.yaml +notifications: + email: + host: smtp.yourhost.com + port: 25 + from: example@email.com + your-notification: + foo: bar + abc: 123 +``` + +If you want to use [scoped package](https://docs.npmjs.com/misc/scope), the configuration is as below: + +```yaml +# config/local.yaml +notifications: + your-notification: + config: + foo: bar + abc: 123 + scopedPackage: '@scope/screwdriver-notifications-your-notification' +``` ### Source Control Plugin