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