Woodpecker Email
plugin to send build status notifications via Email.
Settings
Settings Name | Required | Type | Description | Documentation |
---|---|---|---|---|
dsn | yes | string |
Mail transport configuration | Documentation |
from.address | yes | string |
Email address of the sender | |
from.name | no | string |
Name of the sender | |
recipients | no | string or list |
List of recipients to send this mail to (besides the commit author) | YAML list or comma separated list |
recipients_only | no | boolean |
Exclude the committer | |
content.subject | no | string |
Define the email subject template | |
content.body | no | string |
Define the email body template | |
attachments | no | string or list |
List of files to attach | YAML list or comma separated list |
debug | no | boolean |
Debug mode (email are sent!) |
Example
steps:
mail:
image: deblan/woodpecker-email
settings:
dsn: "smtp://username:password@mail.example.com:587?verify_peer=1"
from:
address: "woodpecker@example.com"
name: "Woodpecker"
evaluate: "build.status == 'failure' or prev_pipeline.status == 'failure'"
recipients:
- dev1@example.com
- dev2@example.com
recipients_only: false
content:
subject: "[{{ pipeline.status }}] {{ repo.full_name }} ({{ commit.branch }} - {{ commit.sha[0:8] }}"
body: |
{{ commit.sha }}<br>
{{ pipeline.status }}<br>
{{ commit.author_email }}<br>
attachments:
- log/*
Evaluation and content
See the Twig documentation.
Variable | Value |
---|---|
workspace |
CI_WORKSPACE |
repo.full_name |
CI_REPO |
repo.owner |
CI_REPO_OWNER |
repo.name |
CI_REPO_NAME |
repo.url |
CI_REPO_URL |
commit.sha |
CI_COMMIT_SHA |
commit.ref |
CI_COMMIT_REF |
commit.branch |
CI_COMMIT_BRANCH |
commit.source_branch |
CI_COMMIT_SOURCE_BRANCH |
commit.target_branch |
CI_COMMIT_TARGET_BRANCH |
commit.tag |
CI_COMMIT_TAG |
commit.pull_request |
CI_COMMIT_PULL_REQUEST |
commit.pull_request_labels |
CI_COMMIT_PULL_REQUEST_LABELS |
commit.message |
CI_COMMIT_MESSAGE |
commit.author |
CI_COMMIT_AUTHOR |
commit.author_email |
CI_COMMIT_AUTHOR_EMAIL |
commit.author_avatar |
CI_COMMIT_AUTHOR_AVATAR |
commit.prerelease |
CI_COMMIT_PRERELEASE |
prev_commit.sha |
CI_PREV_COMMIT_SHA |
prev_commit.ref |
CI_PREV_COMMIT_REF |
prev_commit.branch |
CI_PREV_COMMIT_BRANCH |
prev_commit.source_branch |
CI_PREV_COMMIT_SOURCE_BRANCH |
prev_commit.target_branch |
CI_PREV_COMMIT_TARGET_BRANCH |
prev_commit.message |
CI_PREV_COMMIT_MESSAGE |
prev_commit.author |
CI_PREV_COMMIT_AUTHOR |
prev_commit.author_email |
CI_PREV_COMMIT_AUTHOR_EMAIL |
prev_commit.author_avatar |
CI_PREV_COMMIT_AUTHOR_AVATAR |
prev_commit.url |
CI_PREV_COMMIT_URL |
pipeline.number |
CI_PIPELINE_NUMBER |
pipeline.parent |
CI_PIPELINE_PARENT |
pipeline.event |
CI_PIPELINE_EVENT |
pipeline.url |
CI_PIPELINE_URL |
pipeline.deploy_target |
CI_PIPELINE_DEPLOY_TARGET |
pipeline.status |
CI_PIPELINE_STATUS |
pipeline.created_at |
CI_PIPELINE_CREATED |
pipeline.stared_at |
CI_PIPELINE_STARTED |
pipeline.finished_at |
CI_PIPELINE_FINISHED |
prev_pipeline.number |
CI_PREV_PIPELINE_NUMBER |
prev_pipeline.parent |
CI_PREV_PIPELINE_PARENT |
prev_pipeline.event |
CI_PREV_PIPELINE_EVENT |
prev_pipeline.url |
CI_PREV_PIPELINE_URL |
prev_pipeline.deploy_target |
CI_PREV_PIPELINE_DEPLOY_TARGET |
prev_pipeline.status |
CI_PREV_PIPELINE_STATUS |
prev_pipeline.created_at |
CI_PREV_PIPELINE_CREATED |
prev_pipeline.stared_at |
CI_PREV_PIPELINE_STARTED |
prev_pipeline.finished_at |
CI_PREV_PIPELINE_FINISHED |
workflow.name |
WORKFLOW_NAME |
step.name |
CI_STEP_NAME |
step.number |
CI_STEP_NUMBER |
step.status |
CI_STEP_STATUS |
step.start_at |
CI_STEP_STARTED |
step.finished_at |
CI_STEP_FINISHED |
step.url |
CI_STEP_URL |