feat(Drone): Ajout de notification lors d'une erreur pendant la construction du site

This commit is contained in:
Simon 2023-01-12 09:22:31 +01:00
parent a25c32fa8b
commit 58dd9961e6
1 changed files with 30 additions and 0 deletions

View File

@ -22,6 +22,12 @@ kind: secret
name: STAGING_AWS_SECRET_ACCESS_KEY
data: cZ9+WkF1Q70ckB8ruLEcsKxeTw/sw33D7lMtpmTVjnojcLqUoOHx1arTzjtTSMrs7qXXOm6/xgqAcRqh1RPCRfW1RdVdeGHE84MQyTaU0ob+frzH8lNxCH+VMF0=
---
# drone encrypt Jarnat/jarnat $MATRIX_TOKEN
kind: secret
name: MATRIX_TOKEN
data: kTAKiGEpZMoAh4aTyCJN6DcmG218oG3MiTZ9DFGiZ8Tjs5IMoJOXgkiRudxauegTIWAYzM7bWxue7tN2yaB22uGzVle5YCg=
---
kind: pipeline
type: docker
@ -36,6 +42,7 @@ steps:
image: klakegg/hugo:0.101.0-ext-debian-ci
commands:
- hugo --minify --environment production
- name: deploy
image: klakegg/hugo:0.101.0-ext-debian-ci
environment:
@ -46,6 +53,17 @@ steps:
commands:
- hugo deploy --environment production
- name: notify
image: plugins/matrix
settings:
homeserver: https://converser.eu
roomid: "!QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "@resilien:converser.eu"
accesstoken:
from_secret: MATRIX_TOKEN
when:
status: [ failure ]
trigger:
event:
- tag
@ -64,6 +82,7 @@ steps:
image: klakegg/hugo:0.101.0-ext-debian-ci
commands:
- hugo --minify --buildDrafts --buildFuture --environment staging
- name: deploy
image: klakegg/hugo:0.101.0-ext-debian-ci
environment:
@ -73,3 +92,14 @@ steps:
from_secret: STAGING_AWS_SECRET_ACCESS_KEY
commands:
- hugo deploy --environment staging
- name: notify
image: plugins/matrix
settings:
homeserver: https://converser.eu
roomid: "!QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "@resilien:converser.eu"
accesstoken:
from_secret: MATRIX_TOKEN
when:
status: [ failure ]