Skip to content
Snippets Groups Projects
Commit cbbff1a7 authored by Princelle Maxime's avatar Princelle Maxime :gay_pride_flag:
Browse files

:construction_worker: update CI notifications

parent c8622ea5
1 merge request!23Setup CI Workflow for auto-deployment of master to production environnement
Pipeline #66047 failed with stage
...@@ -6,6 +6,26 @@ clone: ...@@ -6,6 +6,26 @@ clone:
disable: true disable: true
steps: 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 - name: pull
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
...@@ -47,21 +67,51 @@ steps: ...@@ -47,21 +67,51 @@ steps:
- docker-compose up -d - 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 image: appleboy/drone-discord
settings: settings:
webhook_id: webhook_id:
from_secret: discord_webhook_id from_secret: discord_webhook_id
webhook_token: webhook_token:
from_secret: discord_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 avatar_url: https://s3.princelle.org/share/drone-ci.png
message: > message: >
{{#success build.status}} ⚠️ Error on deploying **{{ repo.name }}** repo (*ERP*) on Princelle Cloud...
Successfully deployed ERP (back) on Princelle Infrastructure! (https://back.erp.uni.princelle.org)
{{else}}
Error on deploying ERP (back) on Princelle Infrastructure. **Commit from {{commit.author}} on {{commit.branch}}:**
{{/success}}
{{commit.message}}
{{ build.link }}
when:
status:
- failure
trigger: trigger:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment