Sending SMS Call Notification in Jenkins Pipeline

Sending SMS Call Notification in Jenkins Pipeline

There are certain situations in our project where we need real time notifications in the form of email, SMS or by a phone call in the case when some important Jenkins job got failed.

In this case, we can use Jenkins plugin PagerDuty and can integrate PagerDuty with Jenkins which will help us in achieving our goal.

What is PagerDuty?

PagerDuty is an incident management platform that provides reliable incident notifications via email, push, SMS, and phone, as well as automatic escalations, on-call scheduling, and other functionality to help teams detect and fix infrastructure problems quickly.

Below are the steps we need to follow to integrate PagerDuty with Jenkins:

Step 1:  From the Jenkins Home Page, Manage JenkinsàManage PluginàInstall Page Duty alert.

Step 2: Generate API integration key for pager duty alert.

Click on this link and register your account on pager duty.

 On the home page of pager duty click on configurationàServices

Click on add Services option present at the bottom of the page.

Inside integration settings select option as “Use Our API policy directly” and fill other details as per your requirement and click on add service.

After following up the above steps integration key would be generated exclusively for your account.

Please Note down this integration key for further usage.

Step 3: Now Again go Back to Jenkins, Click on Create New Job.

Step 4: In Post Build Section of Job, Select PagerDuty Incident Trigger.

Step 5: Please provide the Value as per the below screenshot.

Please Note here you need to put your service integration key that was obtained in Step 2. Also, you can specify in which cases you want the incident to be triggered.

Step 6: Execute your Jenkins job now.

Now once our Jenkins job will fail or aborted as per instruction configured in Step no 5. Incident will be a trigger as per option selected by us in Jenkins Job we will receive notifications in the form of email, Phone call or by SMS.

Please Note by default all the incident notifications would be sent out to email id specified while creating your profile in the case you want to opt for notification via Phone and SMS you need to explicitly specify that information in the notification section of your profile.



My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
June 10, 2019 at 10:03 PM

Thanks for the sharing. Best wishes Ankur !

September 5, 2019 at 1:40 PM

Good call tracking software can pinpoint which keyword led to the call,there and as mentioned above track the caller's path through a website.

October 23, 2019 at 12:41 PM

Hi Ankur, Thanks for information. I have question, can we trigger job with SMS? Please confirm.

February 20, 2020 at 6:59 PM

Hi Ankur,able to integrate with mail but unable to update number in SMS as getting "International phone alerts are not enabled for this account." message for same

September 12, 2020 at 11:24 PM

once we install pager duty plugin in jenkins do we need to configure in configure system details ?