There is Telegram Uploader plugin for Jenkins CI which let you upload build artifacts to Telegram.
What's it for?
For example, with this plugin you could automate Android builds uploading to beta-testers Telegram chats directly accessed from mobile devices.
Download plugin hpi package and install it using Jenkins plugins manager (Manage Jenkins->Manage Plugins->Advanced->Upload Plugin).
Warning: this plugin needs Java 1.8.
Configure bot token in Jenkins system settings (Manage Jenkins->Configure System->Telegram Uploader):
Add a "Upload artifacts to Telegram" post-build action to your Jenkins job after "Archive the artifacts" post-build action:
- Chat ID - positive integer value for private chats, negative integer value for groups or string like
- Caption - uploaded artifact caption, 0-200 characters (including expanded environment variables).
- Filter - Ant-style glob to use as filter for the artifact names to upload. Empty value disables filtering.
- Disable notification - send the artifacts silently. If set, users will receive a notification with no sound.
- Fail build if upload is failed - if set, mark build as failed if the artifact can't be uploaded by some reason, otherwise just issue warning in build console.
- Plugin is still in alpha stage. Please report problems using GitHub Issues.
- Sadly I don't know a simple way to obtain Telegram chat ID. You could write something to the bot and then check the
idfield in output of
curl -i -X GET https://api.telegram.org/bot<inser_token_here>/getUpdatescommand.
- Plugin uses Telegram Bot API which (at this moment) limits uploaded file size to 50 MB.
- Links in Caption field are non-clickable on Android devices.
That's all, folks!
"No files are matched by given filter found for upload to the Telegram" Always this message/ Also with empty field
You must archive the artifacts before this task