Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Email notification to a user once the build is successfully deployed using google cloud build

I have currently set up CI/CD using google cloud build to deploy angular app on google app engine. But i want to know is it possible to send email notification to a user once the build is successfully deployed through google cloud build on app engine?

email notification can be sent through jenkins and is it possible to configure similarly using cloud build ?

like image 302
Kavya Avatar asked Oct 23 '25 18:10

Kavya


2 Answers

As of now, you can't directly send email notification on build creation.

Cloud Build publishes messages on a Google Pub/Sub topic when your build's state changes, such as when your build is created, when your build transitions to a working state, and when your build completes and from there you can write Cloud Function to trigger an email.

Cloud Build -> Pub/Sub -> Function -> Email

Steps to configure cloud build notification with Pub/Sub.

like image 53
Gautam Savaliya Avatar answered Oct 25 '25 15:10

Gautam Savaliya


When your Cloud Build builds change states, you can send notifications about these changes via third-party messaging services or email by following the documentation [1]. The documentation [2] will help you to set up email notifications using the Mailgun [3] API. To know more about Mailgun, please follow their quickstart documentation [3]

[1] https://cloud.google.com/cloud-build/docs/configure-third-party-notifications

[2] https://cloud.google.com/cloud-build/docs/configure-third-party-notifications#email_notifications

[3] https://www.mailgun.com/homepage/

like image 41
Shafiq I Avatar answered Oct 25 '25 13:10

Shafiq I