docs(doc): add meta datas and doc about evualute
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
052472ff30
commit
834695af76
41
DOCS.md
41
DOCS.md
|
@ -1,3 +1,13 @@
|
||||||
|
---
|
||||||
|
name: Woodpecker Email
|
||||||
|
icon: https://gitnet.fr/deblan/woodpecker-email/raw/branch/develop/logo.svg
|
||||||
|
description: plugin to send build status notifications via Email.
|
||||||
|
tags: [APT, aptly, publish]
|
||||||
|
containerImage: deblan/woodpecker-email
|
||||||
|
containerImageUrl: https://hub.docker.com/r/deblan/woodpecker-email
|
||||||
|
url: https://gitnet.fr/deblan/woodpecker-email
|
||||||
|
---
|
||||||
|
|
||||||
Use the Email plugin for sending build status notifications via email.
|
Use the Email plugin for sending build status notifications via email.
|
||||||
|
|
||||||
## Config
|
## Config
|
||||||
|
@ -56,6 +66,37 @@ pipeline:
|
||||||
- octocat@github.com
|
- octocat@github.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Evaluation
|
||||||
|
|
||||||
|
This plugin introduces an optional expression to evaluate (on the fly) whether the mail should be sent or not.
|
||||||
|
|
||||||
|
|
||||||
|
```diff
|
||||||
|
pipeline:
|
||||||
|
mail:
|
||||||
|
image: deblan/woodpecker-email
|
||||||
|
settings:
|
||||||
|
...
|
||||||
|
when:
|
||||||
|
- evaluate: 'CI_STEP_STATUS == "failure" || CI_PREV_PIPELINE_STATUS == "failure"'
|
||||||
|
```
|
||||||
|
|
||||||
|
The problem is that the expression is evaluated before the pipeline is generated. In this case, `CI_STEP_STATUS` does not exist yet and the mail step is ignored unless the previous pipeline failed.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
pipeline:
|
||||||
|
mail:
|
||||||
|
image: deblan/woodpecker-email
|
||||||
|
settings:
|
||||||
|
...
|
||||||
|
+ evaluate: 'CI_STEP_STATUS == "failure" || CI_PREV_PIPELINE_STATUS == "failure"'
|
||||||
|
when:
|
||||||
|
- - evaluate: 'CI_STEP_STATUS == "failure" || CI_PREV_PIPELINE_STATUS == "failure"'
|
||||||
|
```
|
||||||
|
|
||||||
|
More information about the syntaxe on ([https://woodpecker-ci.org/docs/next/usage/pipeline-syntax#evaluate](https://woodpecker-ci.org/docs/next/usage/pipeline-syntax#evaluate)).
|
||||||
|
|
||||||
|
|
||||||
### 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
|
||||||
|
|
Loading…
Reference in a new issue