docs: update drone document.
This commit is contained in:
parent
e13da09398
commit
86b2493453
52
DOCS.md
52
DOCS.md
@ -11,9 +11,9 @@ image: appleboy/drone-telegram
|
||||
The Telegram plugin posts build status messages to your account. The below pipeline configuration demonstrates simple usage:
|
||||
|
||||
```yaml
|
||||
pipeline:
|
||||
telegram:
|
||||
- name: send notification
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
```
|
||||
@ -21,9 +21,8 @@ pipeline:
|
||||
Example configuration with photo message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ photo:
|
||||
@ -34,9 +33,8 @@ pipeline:
|
||||
Example configuration with document message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ document:
|
||||
@ -47,9 +45,8 @@ pipeline:
|
||||
Example configuration with sticker message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ sticker:
|
||||
@ -60,9 +57,8 @@ pipeline:
|
||||
Example configuration with audio message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ audio:
|
||||
@ -73,9 +69,8 @@ pipeline:
|
||||
Example configuration with voice message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ voice:
|
||||
@ -86,9 +81,8 @@ pipeline:
|
||||
Example configuration with location message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ location:
|
||||
@ -99,9 +93,8 @@ pipeline:
|
||||
Example configuration with venue message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ venue:
|
||||
@ -112,9 +105,8 @@ pipeline:
|
||||
Example configuration with video message:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ video:
|
||||
@ -125,32 +117,18 @@ pipeline:
|
||||
Example configuration with message format:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ format: markdown
|
||||
```
|
||||
|
||||
Example configuration for success and failure messages:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ when:
|
||||
+ status: [ success, failure ]
|
||||
```
|
||||
|
||||
Example configuration with a custom message template:
|
||||
|
||||
```diff
|
||||
pipeline:
|
||||
telegram:
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: xxxxxxxxxx
|
||||
to: telegram_user_id
|
||||
+ message: >
|
||||
@ -161,7 +139,7 @@ pipeline:
|
||||
+ {{/success}}
|
||||
```
|
||||
|
||||
# Parameter Reference
|
||||
## Parameter Reference
|
||||
|
||||
token
|
||||
: telegram token from [telegram developer center](https://core.telegram.org/bots/api)
|
||||
@ -199,7 +177,7 @@ venue
|
||||
format
|
||||
: `markdown` or `html` format
|
||||
|
||||
# Template Reference
|
||||
## Template Reference
|
||||
|
||||
repo.owner
|
||||
: repository owner
|
||||
@ -246,7 +224,7 @@ build.started
|
||||
build.finished
|
||||
: unix timestamp for build finished
|
||||
|
||||
# Template Function Reference
|
||||
## Template Function Reference
|
||||
|
||||
uppercasefirst
|
||||
: converts the first letter of a string to uppercase
|
||||
|
Loading…
Reference in New Issue
Block a user