1
0
Fork 0

Updated drone pipeline to include mail notification

master
blallo 2020-02-22 14:06:12 +01:00
parent 007979a8e2
commit c65bf29fc8
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 84 additions and 1 deletions

View File

@ -41,8 +41,91 @@ trigger:
event:
- 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="[fenix|SUCCESS] $(date +%Y-%m-%d_%H:%M)" \
Success building fenix \
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="[fenix|FAIL] $(date +%Y-%m-%d_%H:%M)" \
Failed building fenix \
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: 538713d7c935edd351052b79d19fcfefe6398b6db9df7ab0fe2e07e64589cc37
hmac: 58b7d3379af2812381ff21ab4db11726731e1aa0f9e330c13cc2c4fd9ac10d5a
...