serverless-plugin-notification

1.3.1 • Public • Published

Serverless Plugin Notification

serverless npm version

Requirement

  1. Serverless 1.x
  2. Project setup for AWS provider

Plugin installation

  1. Open a terminal to your Serverless project
  2. npm install --save-dev serverless-plugin-notification
  3. Add serverless-plugin-notification in your serverless.yml file (see Serverless docs)
  4. Follow platform specific installation

Supported platforms

Slack

Feature

  1. Notify service deployment to predefined Slack channel with custom username. Supporting states
  • Deployment started
  • Deployment succeeded
  • Deployment failed (TODO)
  1. Predefined message format - General info in post, function and endpoint listing in thread reply
  2. Support Slack thread
  3. Support automatically retrieving deployer name
  4. EMOJIs !

Platform installation

In your serverless.yml fill the following configuration

custom:
  notification:
    deployer: /* Default deployer name, if not automatically retrieve from local variable, if not default to 'Unnamed deployer' */
    slack:
      token: /* Your slack token here */ - Follow https://api.slack.com/bot-users to get bot access token
      channel:  /* Your channel name here */ e.g '#serverless' NOTE: Using direct message '@person' will have 'channel_not_found' error at `Deployment succeeded` and `Deployment failed`
      username: /* (Optional) Username that will be used to post the message */

Webhook

Feature

  1. Notify service deployment through http webhook POST using configurable url and headers. Supporting states:
  • Deployment started
  • Deployment succeeded
  • Deployment failed (TODO)

Missing pieces

  1. Content-Type currently support only application/json
  2. Does not support CORs

Plattform installation

In your serverless.yml fill the following configuration

custom:
  notification:
    webhook:
      url: /* Your webhook url here */
      headers: /* Your headers here - Must be in object format */
        Content-Type: application/json

Readme

Keywords

none

Package Sidebar

Install

npm i serverless-plugin-notification

Weekly Downloads

28

Version

1.3.1

License

MIT

Unpacked Size

12.4 kB

Total Files

7

Last publish

Collaborators

  • blackevil245