diff --git a/DOCS.md b/DOCS.md index 9045f99..234e715 100644 --- a/DOCS.md +++ b/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. ## Config @@ -56,6 +66,37 @@ pipeline: - 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 In some cases you may want to customize the look and feel of the email message