https://github.com/dee-me-tree-or-love/serverless-lambda-announcer
:zap: :speech_balloon: A serverless framework plugin that announces a deploy of a new function to a webhook
https://github.com/dee-me-tree-or-love/serverless-lambda-announcer
Last synced: about 2 months ago
JSON representation
:zap: :speech_balloon: A serverless framework plugin that announces a deploy of a new function to a webhook
- Host: GitHub
- URL: https://github.com/dee-me-tree-or-love/serverless-lambda-announcer
- Owner: dee-me-tree-or-love
- Created: 2018-04-10T13:04:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T08:37:29.000Z (about 2 years ago)
- Last Synced: 2024-04-29T17:07:14.127Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/serverless-lambda-announcer
- Size: 130 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# serverless-lambda-announcer :speech_balloon:
A plugin for serverless framework that announces a deploy of a new function to a given url.
[](https://travis-ci.org/dee-me-tree-or-love/serverless-lambda-announcer)## Purpose
This plugin allows to specify a custom hook listening for lambda deploys.
On deploy the announcer will announce the lambda definition to the specified hook.
The hook should be a `POST` endpoint accepting json-encoded payload.
## Installation
Run `npm install serverless-lambda-announcer`
Add it to the `serverless.yml` as:
```
plugins:
...
- serverless-lambda-announcer
...
```
## Usage
This plugin announces only *full* deployments: fired on `sls deploy` only :v:
### Configuration
In the `serverless.yml` specify a custom parameter for the announcer:
```yaml
custom:
# can be specified as an array attribute too: - announcer:
announcer:
# required:
hook:
# optional:
contract:
/{function name}:
```
**Hook**:
The `hook` must be an accessible `POST` url accepting json input.
**Contract**:
The `contract` is an optional paramter.
If specified must be mapped to function name.
Can be specified in any form.
It will be passed along in the body same way as was specified.
### Announce Body
The body that is sent from the announcer is:
```
[
{
"endpoints": [
{
"method": ,
"path":
}
],
"name": " : ",
"identifier": ,
"events":[
{}
],
"contract":
}
]
```
## Kudos
Some methods are borrowed from the sourcecode of the [`serverless`](https://github.com/serverless/serverless) core plugins - super-duper-mega thanks