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 ?
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.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With