Harbor event notifications for Telegram.
- Support
Artifact pushed
option - PUSH_ARTIFACT event type. - Support
Artifact pulled
option - PULL_ARTIFACT event type. - Support
Artifact deleted
option - DELETE_ARTIFACT event type. - Support
Chart uploaded
option - UPLOAD_CHART event type. - Support
Chart downloaded
option - DOWNLOAD_CHART event type. - Support
Chart deleted
option - DELETE_CHART event type. - Support
Quota exceed
option - QUOTA_EXCEED event type. - Support
Quota near threshold
option - QUOTA_WARNING event type.
- Harbor v2.0 - v2.7
- Harbor ChartMuseum Extension
- Create Telegram Bot with BotFather
- Get Bot API Token
- Get your ChatID (example):
- public:
https:/t.me/MY_CHAT
- private:
-2233445566778
- public:
- Add your bot to chanel or group with admin rules (messages access).
-
TopidID (message_thread_id):
-
Default or General Topic:
0
-
To test with topics:
```bash: curl -X GET 'https://api.telegram.org/bot<bot-api-token>/sendMessage?chat_id=<chat-id>&message_thread_id=<chat-topic-id>&text=HelloTopic!' ```
-
-
To start Bot, run the following command with your variables in terminal:
docker run -it -p 441:441 --name harbor-telegram-bot -e CHAT_ID=<chat-id> -e BOT_TOKEN=<bot-api-token> -e TOPIC_ID=<topic-id> alexpokatilov/harbor-telegram-bot:2.3.0
Set
-e DEBUG=true
, if you want to see all logs with raw format. -
Configure your Harbor
http
webhook -
Check your bot. Send POST request to
http://<hostname>:441/webhook-bot
-
Bot message example:
-
Docker Image (ARTIFACT)
🐳 New image pushed by: admin • Host: hub.harbor.com • Project: test-webhook • Repository: test-webhook/debian • Tag: latest
🐳 Artifact pulled by: admin • Host: hub.harbor.com • Project: test-webhook • Access: public • Repository: test-webhook/debian • Tag: latest
❗️ Attention! 🐳 Artifact removed by: admin • Host: hub.harbor.com • Project: test-webhook • Repository: test-webhook/debian • Tag: latest
-
Helm Chart (CHART)
☸️ New chart version uploaded by: admin • Host: hub.harbor.com • Project: test-webhook • Chart: test-webhook/debian • Version: latest
☸️ Chart pulled by: admin • Host: hub.harbor.com • Project: test-webhook • Access: public • Chart: debian • Version: 0.1.0
❗️ Attention! ☸️ Chart removed by: admin • Host: hub.harbor.com • Project: test-webhook • Chart: test-webhook/debian • Version: latest
-
Alert (QUOTA)
🚨 Alert!!! Project quota has been exceed!!! • Project: test-webhook
⚠️ Warning!! Quota usage reach 85%!! • Project: test-webhook
-