Member-only story
How to send Telegram Notifications with Google Cloud Build (GCB)
This article is a quick HOW-TO after struggling with Google Cloud Build about how to send notifications when a build has failed or is successful. Since I did not want to use Slack and the heavy client, I give a try in this post with Telegram and discover the magical chatbot world.
Contents [hide]
- 1 Google Cloud Build
- 2 Telegram
- 2.1 Telegram Bots
- 3 How to send notifications with GCB
- 3.1 Create a Job with GCB
- 3.2 Check the presence of the subject
- 3.3 Create the Telegram BOT
- 3.4 Create the Cloud Function
- 3.5 Deploying the Cloud Function
- 3.6 Result
- 4 Conclusion and further improvements
Google Cloud Build
Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts.
Google Cloud Build is rather a cheap alternative to Jenkins, Travis-Ci and Circle CI if you have private projects. While the other solutions requires a quite expensive subscription, you pay GCB according the used build time. If you do not commit frequently or the build is a short…