An open API service indexing awesome lists of open source software.

https://github.com/yegor-usoltsev/drone-email-webhook

Webhook listener for Drone CI / CD notifying commit authors of failed builds via email
https://github.com/yegor-usoltsev/drone-email-webhook

build-automation ci devops drone drone-ci drone-plugin email mail smtp webhook

Last synced: 11 months ago
JSON representation

Webhook listener for Drone CI / CD notifying commit authors of failed builds via email

Awesome Lists containing this project

README

          

# drone-email-webhook

[![Build Status](https://github.com/yegor-usoltsev/drone-email-webhook/actions/workflows/ci.yml/badge.svg)](https://github.com/yegor-usoltsev/drone-email-webhook/actions)
[![Codecov](https://codecov.io/github/yegor-usoltsev/drone-email-webhook/graph/badge.svg?token=Z1GET86OND)](https://codecov.io/github/yegor-usoltsev/drone-email-webhook)
[![GitHub Release](https://img.shields.io/github/v/release/yegor-usoltsev/drone-email-webhook?sort=semver)](https://github.com/yegor-usoltsev/drone-email-webhook/releases)
[![Docker Image (docker.io)](https://img.shields.io/docker/v/yusoltsev/drone-email-webhook?label=docker.io&sort=semver)](https://hub.docker.com/r/yusoltsev/drone-email-webhook)
[![Docker Image (ghcr.io)](https://img.shields.io/docker/v/yusoltsev/drone-email-webhook?label=ghcr.io&sort=semver)](https://github.com/yegor-usoltsev/drone-email-webhook/pkgs/container/drone-email-webhook)
[![Docker Image Size](https://img.shields.io/docker/image-size/yusoltsev/drone-email-webhook?sort=semver&arch=amd64)](https://hub.docker.com/r/yusoltsev/drone-email-webhook/tags)

Webhook listener for Drone CI / CD notifying commit authors of failed builds via email.

| ![Light Screenshot](https://raw.githubusercontent.com/yegor-usoltsev/drone-email-webhook/main/.github/light.png) | ![Dark Screenshot](https://raw.githubusercontent.com/yegor-usoltsev/drone-email-webhook/main/.github/dark.png) |
| :--------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: |

## Usage

### Starting the webhook listener

Pull and run the container:

```bash
docker run -d \
-p 3000:3000 \
-e DRONE_SECRET=your_webhook_secret \
yusoltsev/drone-email-webhook:latest
```

See the [Environment Variables](#environment-variables) table below for all available configuration options.

### Configuring Drone

Configure your Drone server to send webhooks by setting the following environment variables:

```yaml
DRONE_WEBHOOK_ENDPOINT: http://your-webhook-host:3000
DRONE_WEBHOOK_SECRET: your_webhook_secret # Must match DRONE_SECRET in webhook container
```

For more information about Drone webhooks configuration, please refer to
the [official Drone documentation](https://docs.drone.io/webhooks/overview/).

Note: Make sure to replace the placeholder values with your actual configuration values.

### Environment Variables

| KEY | TYPE | DEFAULT | REQUIRED |
| --------------------------- | ---------------------------- | ----------------- | -------- |
| `DRONE_SECRET` | `string` | | Yes |
| `DRONE_SERVER_HOST` | `string` | `0.0.0.0` | Yes |
| `DRONE_SERVER_PORT` | `uint16` | `3000` | Yes |
| `DRONE_EMAIL_SMTP_HOST` | `string` | `localhost` | Yes |
| `DRONE_EMAIL_SMTP_PORT` | `uint16` | `25` | Yes |
| `DRONE_EMAIL_SMTP_USERNAME` | `string` | | No |
| `DRONE_EMAIL_SMTP_PASSWORD` | `string` | | No |
| `DRONE_EMAIL_FROM` | `string` | `drone@localhost` | Yes |
| `DRONE_EMAIL_CC` | `[]string` (comma-separated) | | No |
| `DRONE_EMAIL_BCC` | `[]string` (comma-separated) | | No |

## Docker Images

This application is delivered as a multi-platform Docker image and is available for download from two image registries
of choice: [yusoltsev/drone-email-webhook](https://hub.docker.com/r/yusoltsev/drone-email-webhook)
and [ghcr.io/yegor-usoltsev/drone-email-webhook](https://github.com/yegor-usoltsev/drone-email-webhook/pkgs/container/drone-email-webhook).

## Versioning

This project uses [Semantic Versioning](https://semver.org)

## Contributing

Pull requests are welcome. For major changes,
please [open an issue](https://github.com/yegor-usoltsev/drone-email-webhook/issues/new) first to discuss what you would
like to change. Please make sure to update tests as appropriate.

## License

[MIT](https://github.com/yegor-usoltsev/drone-email-webhook/blob/main/LICENSE)