diff --git a/.drone.yml b/.drone.yml index 2d36f5bea6b947e567f41d05eef0207a47c3ef8c..c1cd48204e3c8a3b589efda973157bc2953396d5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,6 +6,26 @@ clone: disable: true steps: +- name: notif build start + image: appleboy/drone-discord + settings: + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token + username: "Drone Princelle (ERP: back)" + avatar_url: https://s3.princelle.org/share/drone-ci.png + message: > + 🚀 Starting deployment of **{{ repo.name }}** repo (*ERP*)... + + + **Commit from {{commit.author}} on {{commit.branch}}:** + + {{commit.message}} + + {{ build.link }} + + - name: pull image: appleboy/drone-ssh settings: @@ -47,21 +67,51 @@ steps: - docker-compose up -d -- name: discord notification +- name: notif deploy done + image: appleboy/drone-discord + settings: + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token + username: "Drone Princelle (ERP: back)" + avatar_url: https://s3.princelle.org/share/drone-ci.png + message: > + ✅ Successfully deployed **{{ repo.name }}** repo (*ERP*) on Princelle Cloud! + + + **Commit from {{commit.author}} on {{commit.branch}}:** + + {{commit.message}} + + **App URL:** https://back.erp.uni.princelle.org/ + + {{ build.link }} + when: + status: + - success + +- name: notif deploy failure image: appleboy/drone-discord settings: webhook_id: from_secret: discord_webhook_id webhook_token: from_secret: discord_webhook_token - username: "Drone Princelle (ERP - back)" + username: "Drone Princelle (ERP: back)" avatar_url: https://s3.princelle.org/share/drone-ci.png message: > - {{#success build.status}} - Successfully deployed ERP (back) on Princelle Infrastructure! (https://back.erp.uni.princelle.org) - {{else}} - Error on deploying ERP (back) on Princelle Infrastructure. - {{/success}} + âš ï¸ Error on deploying **{{ repo.name }}** repo (*ERP*) on Princelle Cloud... + + + **Commit from {{commit.author}} on {{commit.branch}}:** + + {{commit.message}} + + {{ build.link }} + when: + status: + - failure trigger: