A simple notification plugin that allows using a Telegram messenger as Notification Recipient.
- Setup Atlassian SDK
- Build plugin
$ git clone git@github.com:leonoff/bamboo-telegram-plugin.git
$ cd bamboo-telegram-plugin
$ atlas-package
- Install plugin into Bamboo
- Setup Notifications for Build
- Event: All Builds Completed
- Recipient type: Telegram
- Bot API Token: key obtained from Telegram @BotFather
- Chat identifier: identifier of the target chat (group or user)
- Create Telegram Bot
- Setup Telegram Bot
- Talk with @BotFather and enable
/setjoingroups
- Create a group chat and add Bot to the group
- Send a initial command to chat. e.g. /start@YourNameBot
- You could get chat ID from Telegram API e.g.
- Talk with @BotFather and enable
$ curl -s "https://api.telegram.org/botBOT_TOKEN/getUpdates" | json_pp
{
[
{
"message" : {
"entities" : [
{
"type" : "bot_command",
"offset" : 0,
"length" : 6
}
],
"from" : {
"first_name" : "Mikhail",
"last_name" : "Leonov",
"id" : 1000101000
},
"date" : 1476823322,
"chat" : {
"type" : "private",
"first_name" : "Mikhail",
"id" : 163021324,
"last_name" : "Leonov"
},
"message_id" : 10,
"text" : "/start"
},
"update_id" : 57242258
}
]
}