docs: update diff format
This commit is contained in:
parent
f529160760
commit
75ffa6ef7b
156
DOCS.md
156
DOCS.md
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
date: 2017-01-08T00:00:00+00:00
|
date: 2019-10-19T00:00:00+00:00
|
||||||
title: Telegram
|
title: Telegram
|
||||||
author: appleboy
|
author: appleboy
|
||||||
tags: [ notifications, chat ]
|
tags: [ notifications, chat ]
|
||||||
@ -11,7 +11,7 @@ image: appleboy/drone-telegram
|
|||||||
The Telegram plugin posts build status messages to your account. The below pipeline configuration demonstrates simple usage:
|
The Telegram plugin posts build status messages to your account. The below pipeline configuration demonstrates simple usage:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: send notification
|
- name: send telegram notification
|
||||||
image: appleboy/drone-telegram
|
image: appleboy/drone-telegram
|
||||||
settings:
|
settings:
|
||||||
token: xxxxxxxxxx
|
token: xxxxxxxxxx
|
||||||
@ -21,122 +21,132 @@ The Telegram plugin posts build status messages to your account. The below pipel
|
|||||||
Example configuration with photo message:
|
Example configuration with photo message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ photo:
|
to: telegram_user_id
|
||||||
+ - tests/1.png
|
+ photo:
|
||||||
+ - tests/2.png
|
+ - tests/1.png
|
||||||
|
+ - tests/2.png
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with document message:
|
Example configuration with document message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ document:
|
to: telegram_user_id
|
||||||
+ - tests/1.pdf
|
+ document:
|
||||||
+ - tests/2.pdf
|
+ - tests/1.pdf
|
||||||
|
+ - tests/2.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with sticker message:
|
Example configuration with sticker message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ sticker:
|
to: telegram_user_id
|
||||||
+ - tests/3.png
|
+ sticker:
|
||||||
+ - tests/4.png
|
+ - tests/3.png
|
||||||
|
+ - tests/4.png
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with audio message:
|
Example configuration with audio message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ audio:
|
to: telegram_user_id
|
||||||
+ - tests/audio1.mp3
|
+ audio:
|
||||||
+ - tests/audio2.mp3
|
+ - tests/audio1.mp3
|
||||||
|
+ - tests/audio2.mp3
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with voice message:
|
Example configuration with voice message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ voice:
|
to: telegram_user_id
|
||||||
+ - tests/voice1.ogg
|
+ voice:
|
||||||
+ - tests/voice2.ogg
|
+ - tests/voice1.ogg
|
||||||
|
+ - tests/voice2.ogg
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with location message:
|
Example configuration with location message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ location:
|
to: telegram_user_id
|
||||||
+ - 24.9163213,121.1424972
|
+ location:
|
||||||
+ - 24.9263213,121.1224972
|
+ - 24.9163213,121.1424972
|
||||||
|
+ - 24.9263213,121.1224972
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with venue message:
|
Example configuration with venue message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ venue:
|
to: telegram_user_id
|
||||||
+ - 24.9163213,121.1424972,title,address
|
+ venue:
|
||||||
+ - 24.3163213,121.1824972,title,address
|
+ - 24.9163213,121.1424972,title,address
|
||||||
|
+ - 24.3163213,121.1824972,title,address
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with video message:
|
Example configuration with video message:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ video:
|
to: telegram_user_id
|
||||||
+ - tests/video1.mp4
|
+ video:
|
||||||
+ - tests/video2.mp4
|
+ - tests/video1.mp4
|
||||||
|
+ - tests/video2.mp4
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with message format:
|
Example configuration with message format:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ format: markdown
|
to: telegram_user_id
|
||||||
|
+ format: markdown
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration with a custom message template:
|
Example configuration with a custom message template:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
image: appleboy/drone-telegram
|
- name: send telegram notification
|
||||||
settings:
|
image: appleboy/drone-telegram
|
||||||
token: xxxxxxxxxx
|
settings:
|
||||||
to: telegram_user_id
|
token: xxxxxxxxxx
|
||||||
+ message: >
|
to: telegram_user_id
|
||||||
+ {{#success build.status}}
|
+ message: >
|
||||||
+ build {{build.number}} succeeded. Good job.
|
+ {{#success build.status}}
|
||||||
+ {{else}}
|
+ build {{build.number}} succeeded. Good job.
|
||||||
+ build {{build.number}} failed. Fix me please.
|
+ {{else}}
|
||||||
+ {{/success}}
|
+ build {{build.number}} failed. Fix me please.
|
||||||
|
+ {{/success}}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameter Reference
|
## Parameter Reference
|
||||||
|
Loading…
Reference in New Issue
Block a user