Updated drone pipeline to include mail notification

master
blallo 2020-02-22 13:33:59 +01:00
parent 01edce4a75
commit fc053ed1a3
1 changed files with 83 additions and 1 deletions

View File

@ -43,8 +43,90 @@ trigger:
- push
- cron
---
type: pipeline
name: notify_success
clone:
disable: true
steps:
- name: notify_success
pull: if-not-exists
image: leophys/mailer:0.1
commands: |
cat << EOM \| /sendmail \
-server-address=${M_SERVER_ADDRESS} \
-server-port=465 \
-user=${M_USER} \
-password=${M_PASSWORD} \
-from=${M_FROM} \
-to=${M_TO} \
-sub="[Signal|SUCCESS] $(date +%Y-%m-%d_%H:%M)" \
Success building Signal \
EOM
environment:
M_SERVER_ADDRESS:
from_secret: m_server_address
M_USER:
from_secret: m_user
M_PASSWORD:
from_secret: m_password
M_FROM:
from_secret: m_from
M_TO:
from_secret: m_to
trigger:
status:
- success
depends_on:
- default
---
type: pipeline
name: notify_failure
clone:
disable: true
steps:
- name: notify_failure
pull: if-not-exists
image: leophys/mailer:0.1
commands: |
cat << EOM \| /sendmail \
-server-address=${M_SERVER_ADDRESS} \
-server-port=465 \
-user=${M_USER} \
-password=${M_PASSWORD} \
-from=${M_FROM} \
-to=${M_TO} \
-sub="[Signal|FAIL] $(date +%Y-%m-%d_%H:%M)" \
Failed building Signal \
EOM
environment:
M_SERVER_ADDRESS:
from_secret: m_server_address
M_USER:
from_secret: m_user
M_PASSWORD:
from_secret: m_password
M_FROM:
from_secret: m_from
M_TO:
from_secret: m_to
trigger:
status:
- failure
depends_on:
- default
---
kind: signature
hmac: 1f36630119748326d827330cb73300fd9a858ff238461c0258d77ecdda182e0b
hmac: 128b72f8e89a1cf87ce866c0a5315744069228fc8add6683643195e9a67611e6
...