From fa69400d6c05ac650906da9d86f1275277bbca6f Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 10 Nov 2015 17:44:23 -0800 Subject: [PATCH] initial commit --- .drone.sec | 1 + DOCS.md | 22 ++++++++++++++++++++++ Dockerfile | 9 +++++++++ README.md | 41 +++++++++++++++++++++++++++++++++++++++++ main.go | 32 ++++++++++++++++++++++++++------ sender.go | 3 ++- 6 files changed, 101 insertions(+), 7 deletions(-) create mode 100644 .drone.sec create mode 100644 DOCS.md create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.drone.sec b/.drone.sec new file mode 100644 index 0000000..ee76218 --- /dev/null +++ b/.drone.sec @@ -0,0 +1 @@ +eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.ivt1r_hG7xhdImbwXIKSnGTkja9yPox9EjA58WhNXEvi7YHdFKsHx5LNcyH_o1W9LrUZEg0ag7QSEklpz900YdNX9HP6lpQ0yZso7Igo6i39nmvEihKypuIGWq8T3Vg7-ZH6UqwYuirxTKFU6lXcym-MLx7c8SEXdpnvUVO-Iq1X2ZGDLHjpi3h81qfsl5cvDdJadq9C2gCrqcHzXiiGLFMNVcB0zeIu8Q0osAZvmzMo9RoWZ3aAz8MH7JNNwbrUkZpO5t9wH0MqaaYbEKACWT6JP1XAUsEWv48CHQ1G2rtdNcjYMtJQbN78joTNkvDK6RkmBC5ZuCqfgeD_7Mi8OA.3hffaFSq-yxJWWaK._Ld4LgMpg4rn02CsVTTxrHbCUwmR_Z-JSkgAJgZg-U3Qz-EStA1G5G6oiOzunWMGTMgUDql4r8kigpC41GVbvv1_XGbUxKaribC_5p1_SBPZ8nZQ03zeKBp9-opW_gsImQkaqbG0L0GhHKVIaibhAsovo_92bb_gLu_W6oZgrWtATt1qgN0Q-8uRcfo-tuIzI0nU5vlQ4bmmNqfnT7QxGMIV-WhKZy5Rj004izO6bJojuAwuWq_WugWIhQbz-qpVnu0LlLwBbEVBaj6RsSULRHf_1UYVe_K3mmHxbcEpuRkiOU7yRJvwxsprQc0Hqge95QGKgwehZGF6SXfQstm4QnuV17_8PH3--cVLkIgzoZZ7yKWOYNqznn_ZX5jAFZdF5nRqyA.Ea5tn0QTKCKsjGoGP3tHlQ \ No newline at end of file diff --git a/DOCS.md b/DOCS.md new file mode 100644 index 0000000..dd8e5d2 --- /dev/null +++ b/DOCS.md @@ -0,0 +1,22 @@ +Use the Email plugin to send an email to a recipient list when a build completes. The following parameters are used to configuration the email plugin: + +* **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) + +Same email configuration: + +```yaml +notify: + email: + from: noreply@github.com + host: smtp.mailgun.org + port: 587 + username: octocat + password: 12345 + recipients: + - octocat@github.com +``` diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e18c00c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +# Docker image for Drone's email notification plugin +# +# CGO_ENABLED=0 go build -a -tags netgo +# docker build --rm=true -t plugins/drone-email . + +FROM gliderlabs/alpine:3.1 +RUN apk-install ca-certificates +ADD drone-email /bin/ +ENTRYPOINT ["/bin/drone-email"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..30f1ca7 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# drone-email + +Drone plugin for sending email notifications. + +## Overview + +This plugin is responsible for sending build notifications via email: + +``` +./drone-email <