feat: updated message template format
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2020-06-10 15:15:42 +02:00
parent 5ee5868f5b
commit 7b62ae9f57
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -82,7 +82,18 @@ steps:
pull: if-not-exists
image: appleboy/drone-discord:latest
settings:
message: "{{#success build.status}} ✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{else}} ❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{/success}}\n"
message: >
{{#success build.status}}
✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{else}}
❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{/success}}
webhook_id:
from_secret: discord_webhook_id
webhook_token:
@ -117,7 +128,17 @@ steps:
pull: always
image: appleboy/drone-discord:latest
settings:
message: "{{#success build.status}} ✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{else}} ❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{/success}}\n"
message: >
{{#success build.status}}
✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{/success}}
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
@ -153,7 +174,16 @@ steps:
pull: if-not-exists
image: appleboy/drone-discord:latest
settings:
message: "{{#success build.status}} ✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{else}} ❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n{{/success}}\n"
message: >
{{#success build.status}}
✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{/success}}
webhook_id:
from_secret: discord_webhook_id
webhook_token:
@ -188,7 +218,16 @@ steps:
pull: always
image: appleboy/drone-discord:latest
settings:
message: "{{#success build.status}} ✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{else}} ❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n{{/success}}\n"
message: >
{{#success build.status}}
✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{/success}}
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token: