telegram-notifications-plugin
telegram-notifications-plugin copied to clipboard
This plugin allows you to send messages from Jenkins jobs to Telegram chat.
TeleJenkins 
This plugin allows Jenkins to send notifications via telegram bot.
Installation
Build from source
- To build a plugin, run
mvn install
. This will create the file ./target/telegram-notifications.hpi - Manually install plugin to your Jenkins
Download an hpi
- Download telegram-notifications-*.hpi release here
- Manually install plugin to your Jenkins
Plugin Manager
- Go to <your_jenkins>/pluginManager/available
- Find and install Telegram Bot
Basic usage
Create bot
- Find BotFather in Telegram (@BotFather)
- Send /newbot command
- Follow the instructions
Global config
- Open the Jenkins global config
- Paste your bot name and token to according textfields
Subscribe for Jenkins messages
- In telegram find your bot and send /start command
- Send /sub command
Manage your job
- Add a build step and/or a post build step
- Fill the message (you can use environment variables and simple Markdown)
Use in Pipeline
telegramSend 'Hello World'
Or, to send the message to some specific chat/channel:
telegramSend(message: 'Hello World', chatId: 1234567890)