Jenkins

Jenkins – Notification

Jenkins – Notification

Jenkins includes an out-of-the-box feature for adding email notification to a build project.

Step 1: Set up an SMTP server. Navigate to Manage Jenkins Configure System. Enter the needed SMTP server and user email-suffix details in the Email notification section.


 

Step 2 − Configure the recipients in the ‘Jenkins project’ - At the end of any Jenkins build project configuration, there is an option to add recipients who will get email notifications for unstable or broken builds. Then press the Save button.


Aside from the default, there are notification plugins on the market. For example, Tikal Knowledge's notification plugin lets you deliver Job Status notifications in JSON and XML forms. This plugin will enable you to configure endpoints, as shown below.


Given below are the details of each option −

  • "Format" − This is the notification payload format, which can be JSON or XML.
  • "Protocol" – This is used for sending notification messages, TCP, HTTP, or UDP.
  • "Event" − The job events such as job started, job finalised, job completed, or all events that trigger notifications.
  • "URL" − URL for sending notifications. For HTTP protocol, it takes the form of "http://host", and for UDP and TCP protocols, it takes the form of "host:port".
  • "Timeout" − Timeout in milliseconds for submitting notification request, defaulting to 30 seconds.