From 7b62ae9f574e38b2211a0eb5be398e182143f9b6 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 10 Jun 2020 15:15:42 +0200 Subject: [PATCH] feat: updated message template format --- .drone.yml | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index f59110c..b2b9e49 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: