Streamlined the documentation
This commit is contained in:
parent
9c566da9a2
commit
07a1259df4
20
DOCS.md
20
DOCS.md
|
@ -1,20 +1,22 @@
|
|||
Use the Email plugin to send an email to a recipient list when a build completes. The following parameters are used to configure the email plugin:
|
||||
Use this plugin for sending build status notifications via Email. You can
|
||||
override the default configuration with the following parameters:
|
||||
|
||||
* `from` - sends email from this address
|
||||
* `host` - smtp server host
|
||||
* `port` - smtp server port (defaults to `587`)
|
||||
* `username` - smtp server username
|
||||
* `password` - smtp server password
|
||||
* `recipient` - list of email recipients (defaults to commit email)
|
||||
* `from` - Send notifications from this address
|
||||
* `host` - SMTP server host
|
||||
* `port` - SMTP server port, defaults to `587`
|
||||
* `username` - SMTP username
|
||||
* `password` - SMTP password
|
||||
* `recipients` - List of recipients, defaults to commit email
|
||||
|
||||
Same email configuration:
|
||||
## Example
|
||||
|
||||
The following is a sample configuration in your .drone.yml file:
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
email:
|
||||
from: noreply@github.com
|
||||
host: smtp.mailgun.org
|
||||
port: 587
|
||||
username: octocat
|
||||
password: 12345
|
||||
recipients:
|
||||
|
|
60
README.md
60
README.md
|
@ -1,12 +1,13 @@
|
|||
# drone-email
|
||||
|
||||
Drone plugin for sending email notifications.
|
||||
[![Build Status](http://beta.drone.io/api/badges/drone-plugins/drone-email/status.svg)](http://beta.drone.io/drone-plugins/drone-email)
|
||||
[![](https://badge.imagelayers.io/plugins/drone-email:latest.svg)](https://imagelayers.io/?images=plugins/drone-email:latest 'Get your own badge on imagelayers.io')
|
||||
|
||||
## Overview
|
||||
Drone plugin for sending build status notifications via Email
|
||||
|
||||
This plugin is responsible for sending build notifications via email:
|
||||
## Usage
|
||||
|
||||
```
|
||||
```sh
|
||||
./drone-email <<EOF
|
||||
{
|
||||
"repo" : {
|
||||
|
@ -34,7 +35,56 @@ This plugin is responsible for sending build notifications via email:
|
|||
"port": 587,
|
||||
"username": "",
|
||||
"password": "",
|
||||
"recipients": ["octocat@github.com"]
|
||||
"recipients": [
|
||||
"octocat@github.com"
|
||||
]
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
Build the Docker container using `make`:
|
||||
|
||||
```sh
|
||||
make deps build
|
||||
docker build --rm=true -t plugins/drone-email .
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```sh
|
||||
docker run -i plugins/drone-email <<EOF
|
||||
{
|
||||
"repo" : {
|
||||
"owner": "foo",
|
||||
"name": "bar",
|
||||
"full_name": "foo/bar"
|
||||
},
|
||||
"system": {
|
||||
"link_url": "http://drone.mycompany.com"
|
||||
},
|
||||
"build" : {
|
||||
"number": 22,
|
||||
"status": "success",
|
||||
"started_at": 1421029603,
|
||||
"finished_at": 1421029813,
|
||||
"commit": "64908ed2414b771554fda6508dd56a0c43766831",
|
||||
"branch": "master",
|
||||
"message": "Update the Readme",
|
||||
"author": "johnsmith",
|
||||
"author_email": "john.smith@gmail.com"
|
||||
},
|
||||
"vargs": {
|
||||
"from": "noreply@foo.com",
|
||||
"host": "smtp.mailgun.org",
|
||||
"port": 587,
|
||||
"username": "",
|
||||
"password": "",
|
||||
"recipients": [
|
||||
"octocat@github.com"
|
||||
]
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue