docs: add documentation about "evaluate" and remove info about drone
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
a3aab36b52
commit
e9edb536ab
53
DOCS.md
53
DOCS.md
|
@ -17,19 +17,16 @@ You can configure the plugin using the following parameters:
|
||||||
* **subject** - The subject line template
|
* **subject** - The subject line template
|
||||||
* **body** - The email body template
|
* **body** - The email body template
|
||||||
* **attachment** - An optional file to attach to the sent mail(s), can be an absolute path or relative to the working directory.
|
* **attachment** - An optional file to attach to the sent mail(s), can be an absolute path or relative to the working directory.
|
||||||
|
* **evaluate** - An optional expression to evaluate (on the fly) whether the mail should be sent or not.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
The following is a sample configuration in your .drone.yml file:
|
The following is a sample configuration in your .woodpecker.yml file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: pipeline
|
pipeline:
|
||||||
type: docker
|
mail:
|
||||||
name: default
|
image: deblan/woodpecker-email
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: notify
|
|
||||||
image: drillster/drone-email
|
|
||||||
settings:
|
settings:
|
||||||
from.address: noreply@github.com
|
from.address: noreply@github.com
|
||||||
from.name: John Smith
|
from.name: John Smith
|
||||||
|
@ -41,12 +38,13 @@ steps:
|
||||||
```
|
```
|
||||||
|
|
||||||
### Secrets
|
### Secrets
|
||||||
|
|
||||||
The Email plugin supports reading credentials and other parameters from the Drone secret store. This is strongly recommended instead of storing credentials in the pipeline configuration in plain text.
|
The Email plugin supports reading credentials and other parameters from the Drone secret store. This is strongly recommended instead of storing credentials in the pipeline configuration in plain text.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
steps:
|
pipeline:
|
||||||
- name: notify:
|
mail:
|
||||||
image: drillster/drone-email
|
image: deblan/woodpecker-email
|
||||||
settings:
|
settings:
|
||||||
from.address: noreply@github.com
|
from.address: noreply@github.com
|
||||||
host: smtp.mailgun.org
|
host: smtp.mailgun.org
|
||||||
|
@ -58,21 +56,6 @@ steps:
|
||||||
- octocat@github.com
|
- octocat@github.com
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the command line utility to add the secrets to the store:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
drone secret add \
|
|
||||||
--repository octocat/hello-world \
|
|
||||||
--name email_username \
|
|
||||||
--data octocat
|
|
||||||
drone secret add \
|
|
||||||
--repository octocat/hello-world \
|
|
||||||
--name email_password \
|
|
||||||
--data 12345
|
|
||||||
```
|
|
||||||
|
|
||||||
See [Secret Guide](https://docs.drone.io/secret/) for additional information on secrets.
|
|
||||||
|
|
||||||
### Custom Templates
|
### Custom Templates
|
||||||
|
|
||||||
In some cases you may want to customize the look and feel of the email message
|
In some cases you may want to customize the look and feel of the email message
|
||||||
|
@ -90,9 +73,9 @@ provided as a string or as a remote URL which gets fetched and parsed:
|
||||||
Example configuration that generate a custom email:
|
Example configuration that generate a custom email:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
pipeline:
|
||||||
- name: notify
|
mail:
|
||||||
image: drillster/drone-email
|
image: deblan/woodpecker-email
|
||||||
settings:
|
settings:
|
||||||
from.address: noreply@github.com
|
from.address: noreply@github.com
|
||||||
host: smtp.mailgun.org
|
host: smtp.mailgun.org
|
||||||
|
@ -118,9 +101,9 @@ following additional parameter:
|
||||||
Example configuration that skips SSL verification:
|
Example configuration that skips SSL verification:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
steps:
|
pipeline:
|
||||||
- name: notify
|
mail:
|
||||||
image: drillster/drone-email
|
image: deblan/woodpecker-email
|
||||||
settings:
|
settings:
|
||||||
from: noreply@github.com
|
from: noreply@github.com
|
||||||
host: smtp.mailgun.org
|
host: smtp.mailgun.org
|
||||||
|
@ -137,9 +120,9 @@ by the server, traffic is going to be encrypted.
|
||||||
You may want to disable STARTTLS, e.g., with faulty and/or internal servers:
|
You may want to disable STARTTLS, e.g., with faulty and/or internal servers:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
steps:
|
pipeline:
|
||||||
- name: notify
|
mail:
|
||||||
image: drillster/drone-email
|
image: deblan/woodpecker-email
|
||||||
settings:
|
settings:
|
||||||
from: noreply@github.com
|
from: noreply@github.com
|
||||||
host: smtp.mailgun.org
|
host: smtp.mailgun.org
|
||||||
|
|
17
README.md
17
README.md
|
@ -1,9 +1,6 @@
|
||||||
# drone-email
|
# woodpecker-email
|
||||||
|
|
||||||
[![Go Doc](https://godoc.org/github.com/Drillster/drone-email?status.svg)](http://godoc.org/github.com/Drillster/drone-email)
|
Woodpecker plugin to send build status notifications via Email. For the usage information and a listing of the available options please take a look at [the docs](DOCS.md).
|
||||||
[![Go Report](https://goreportcard.com/badge/github.com/Drillster/drone-email)](https://goreportcard.com/report/github.com/Drillster/drone-email)
|
|
||||||
|
|
||||||
Drone plugin to send build status notifications via Email. For the usage information and a listing of the available options please take a look at [the docs](DOCS.md).
|
|
||||||
|
|
||||||
## Binary
|
## Binary
|
||||||
|
|
||||||
|
@ -18,15 +15,7 @@ go build
|
||||||
Build the docker image with the following commands:
|
Build the docker image with the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build -t drillster/drone-email:latest .
|
docker build -t deblan/woodpecker-email:latest .
|
||||||
```
|
|
||||||
|
|
||||||
Build the docker for ARM with buildx
|
|
||||||
|
|
||||||
```
|
|
||||||
docker buildx create --name mybuilder
|
|
||||||
docker buildx use mybuilder
|
|
||||||
docker buildx build --file Dockerfile.armhf --platform linux/arm64/v7,linux/arm64 -t drone-email:latest .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This will create a Docker image called `drillster/drone-email:latest`.
|
This will create a Docker image called `drillster/drone-email:latest`.
|
||||||
|
|
Loading…
Reference in a new issue