Sending Messages when DevCS Jobs Fail | OCI Notification Service

OCI Notifications are subscription topics for sending messages to channels like email, rest or pager when things happen.


In the following example we are sending a notification when the start job of an autonomous database fails, for example if the database is already started.

oci db autonomous-database start --autonomous-database-id || 
# send notification as it failed
oci ons message publish --topic-id --title "ATP start failed" --body "Take a look at the build job logs"; 
# exiting saying it failed
exit 1; 

That’s all folks! Hope it helps 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.