full revert to older webhooks
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2020-03-09 07:54:45 +01:00
parent a70806d6f6
commit 109a64ef6f
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -14,7 +14,6 @@ steps:
from_secret: dockerhub_endpoint
commands:
- curl -s -X POST $ENDPOINT
- echo
---
@ -51,7 +50,7 @@ steps:
pull: always
image: appleboy/drone-discord:1.2.4
settings:
message: "{{#success build.status}} {{commit.author}}\n✅Build #{{build.number}} of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\n\ncommit [`{{build.commit}}`](https://git.dotya.ml/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}) on `{{commit.branch}}`\n``` {{commit.message}} ```\n[build log]({{build.link}}) {{else}} {{commit.author}}\n❌Build #{{build.number}} of `{{repo.name}}` failed.\ncommit [`{{build.commit}}`](https://git.dotya.ml/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}) on `{{commit.branch}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n[build log]({{build.link}}) {{/success}}\n"
message: "{{#success build.status}} {{commit.author}}\n✅Build #{{build.number}} of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\n\ncommit `{{build.commit}}` on `{{commit.branch}}`\n```{{commit.message}}```\n[build log]({{build.link}}) {{else}} {{commit.author}}\n❌Build #{{build.number}} of `{{repo.name}}` failed.\ncommit [`{{build.commit}}`](https://git.dotya.ml/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}) on `{{commit.branch}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n[build log]({{build.link}}) {{/success}}\n"
webhook_id:
from_secret: discord_webhook_id
webhook_token:
@ -99,6 +98,41 @@ steps:
# - dockerhub-build-trigger
# ---
# kind: pipeline
# name: notifications-cronbuild
#
# platform:
# os: linux
# arch: amd64
#
# clone:
# disable: true
#
# steps:
# - name: discord
# pull: always
# image: curlimages/curl
# environment:
# webhook_id:
# from_secret: discord_webhook_hourly_id
# webhook_token:
# from_secret: discord_webhook_hourly_token
# commands:
# - curl -sL -H "Content-Type:application/json" -X POST https://discordapp.com/api/webhooks/$webhook_id/$webhook_token -d '{"wait":false,"content":"","username":"","avatar_url":"","tts":false,"embeds":[{"title":":white_check_mark:Hourly build \#${DRONE_BUILD_NUMBER} of `${DRONE_REPO}` succeeded.","description":"event:**`${DRONE_BUILD_EVENT}`**\n\ncommit [`${DRONE_COMMIT_SHA}`](${DRONE_COMMIT_LINK}) on [`${DRONE_COMMIT_BRANCH}`](https://git.dotya.ml/${DRONE_REPO}/src/branch/${DRONE_COMMIT_BRANCH})\n${DRONE_COMMIT_MESSAGE} - ${DRONE_COMMIT_AUTHOR_NAME}\n\n[go to repo](https://${DRONE_SYSTEM_HOST}/${DRONE_REPO})","url":"https://${DRONE_SYSTEM_HOST}/${DRONE_REPO}/${DRONE_BUILD_NUMBER}","color":7506394,"footer":{"text":"drone discord webhook"},"author":{"name":"${DRONE_COMMIT_AUTHOR}","url":"https://git.dotya.ml/${DRONE_COMMIT_AUTHOR}","icon_url":"https://git.dotya.ml/user/avatar/${DRONE_COMMIT_AUTHOR}/-1"},"fields":null}]}'
# trigger:
# event:
# - cron
# cron:
# - hourly
# - hourly-build
# status:
# - success
# - failure
#
# depends_on:
# - dockerhub-build-trigger
---
kind: pipeline
name: notifications-cronbuild
@ -110,17 +144,6 @@ platform:
clone:
disable: true
steps:
- name: discord
pull: always
image: curlimages/curl
environment:
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token
commands:
- curl -sL -H "Content-Type:application/json" -X POST https://discordapp.com/api/webhooks/$webhook_id/$webhook_token -d '{"wait":false,"content":"","username":"","avatar_url":"","tts":false,"embeds":[{"title":":white_check_mark:Hourly build \#${DRONE_BUILD_NUMBER} of `${DRONE_REPO}` succeeded.","description":"event:**`${DRONE_BUILD_EVENT}`**\n\ncommit [`${DRONE_COMMIT_SHA}`](${DRONE_COMMIT_LINK}) on [`${DRONE_COMMIT_BRANCH}`](https://git.dotya.ml/${DRONE_REPO}/src/branch/${DRONE_COMMIT_BRANCH})\n${DRONE_COMMIT_MESSAGE} - ${DRONE_COMMIT_AUTHOR_NAME}\n\n[go to repo](https://${DRONE_SYSTEM_HOST}/${DRONE_REPO})","url":"https://${DRONE_SYSTEM_HOST}/${DRONE_REPO}/${DRONE_BUILD_NUMBER}","color":7506394,"footer":{"text":"drone discord webhook"},"author":{"name":"${DRONE_COMMIT_AUTHOR}","url":"https://git.dotya.ml/${DRONE_COMMIT_AUTHOR}","icon_url":"https://git.dotya.ml/user/avatar/${DRONE_COMMIT_AUTHOR}/-1"},"fields":null}]}'
trigger:
event:
- cron
@ -133,3 +156,13 @@ trigger:
depends_on:
- dockerhub-build-trigger
steps:
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
settings:
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token