From db495c525e3a55f857f696d0a91a04adaf92cf1d Mon Sep 17 00:00:00 2001 From: Nick Slowinski Date: Fri, 18 Jun 2021 10:11:41 +0200 Subject: [PATCH] Telegram und Drone-Config eingerichtet --- .drone.yml | 32 ++++++++++++++++++++++++++------ telegram-notification.tpl | 7 +++++++ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 telegram-notification.tpl diff --git a/.drone.yml b/.drone.yml index 3e008c1..c8a49dc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,13 +1,33 @@ -name: php builder +name: build and publish image kind: pipeline type: docker + steps: -- name: php +- name: build and publish image: plugins/docker settings: - repo: nickslowinski/robotter112 - tags: php + repo: nickslowinski/robotter112.de-php-docker + tags: + - '7.4' + - '7' username: - from_secret: docker_username + from_secret: ns_docker_username password: - from_secret: docker_password \ No newline at end of file + from_secret: ns_docker_password + when: + branch: + - release/v7.4 +- name: send telegram notification + image: appleboy/drone-telegram + settings: + token: + from_secret: tg-drone-bot-token + to: + from_secret: tg-robotter112.de-chat-id + message_file: telegram-notification.tpl + depends_on: + - build and publish + when: + status: + - failure + - success \ No newline at end of file diff --git a/telegram-notification.tpl b/telegram-notification.tpl new file mode 100644 index 0000000..ee9b2ef --- /dev/null +++ b/telegram-notification.tpl @@ -0,0 +1,7 @@ +Build abgeschlossen für *{{repo.owner}}/{{repo.name}}* +Status: *{{build.status}}* +Build-ID: {{build.number}} +Commit: `[{{truncate commit.sha 8}}]({{commit.link}})` + +Start: {{datetime build.started}} +Ende: {{datetime build.finished}} \ No newline at end of file