Sunday, December 20, 2015

Configure Jenkins email notifications

In this tutorial we will discuss about setting up the email notification in your Jenkins environment from the start :

Part I: Configure the email notifications from Jenkins Management section.

Part II : Configure the email notification for the individual Jenkins job  

Part I: Configure the email notifications from Jenkins Management section.

  1. First you should be logged in to Jenkins interface as Administrators, so you should see 'Manage Jenkins' link on the left side options.
  2. Click on the 'Manage Jenkins', to navigate to 'Manage Jenkins' page. 'Configure System' option should be available
  3. Click on the 'Configure System' link, scroll down on 'Configure System' page, you should see the 'Email notifications' section.
  4. Set the following settings in the 'Email notification' section [We are taking yahoo domain for example]
    • SMTP Server : smtp.mail.yahoo.com
    • Check 'Use SMTP Authentication'
    • Username : <email address to send emails> Example : test@yahoo.com
    • Password : <used email address password>
    • Check 'Use SSL'
    • SMTP Port : 465
    • Reply-To-Address :  <email address to reply emails, can be same email or different>
    • Charset : UTF-8
    • Scroll up on the page and now set following settings in 'Locations' section
      • System admin e-mail address :  <email address to send emails> Example : test@yahoo.com
    • Now to test your email configurations, Scroll down to 'Email Notification' section.
      • Check 'Test Configuration by sending test e-mail'
      • Test e-mail recipient : <recipient email address to test configuration> Example: youremail@yahoo.com
      • Click on "Test Configuration" button.
    • You should see message 'Email was successfully sent'. It yes, congrats you have successfully configured Jenkins email notifications :)
    • 'Apply' and 'Save' the changes.

    Part II : Configure the email notification for the individual Jenkins job  

    1. Navigate to configuration page of Jenkins job, for which you wants to send a email notification. For example we have a job 'test-email-notification'
    2. Under 'Post Build Actions', click on 'Add post build action' and select 'Email Notification' option.
    3. Now, when the 'Email notification' section visible. Provide the recipients email addresses and select other check box options per your requirement
    4. Click on Apply and Save the changes.
    Feel free to leave your comments in case of any issues in above steps... :)

    No comments:

    AWS Certified Solutions Architect Associate - AWS Introduction - Questions

    All the Best !!! Show Result !! Try Again !! ×