Skip to content

kapgarxmatters/xmatters-labs-Jenkins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins

The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. Check out the sweet video here.

Pre-Requisites

  • Jenkins Instance with the http_request plugin installed.
  • Jenkins Communication Plan (see files) imported into xMatters or created in xMatters.
  • xMatters account - If you don't have one, get one!

Files

  • JenkinsLibrary.js - The javascript file to be pasted into a Shared Library. Jenkins is limited to pushing 3 or 4 environmental variables via the http_request plugin. This library reaches back into Jenkins via a GET command to extract additional information about the build.
  • Jenkins.zip - The Communication Plan (optional). You can use this pre built communication plan and import it into your xMatters instance or create one from scratch.
  • JenkinsIB.js - The javascript file to be pasted into the Inbound IB component. This script calls the library.

Installation

Jenkins set up

Install the Jenkins http_request plugin Jenkins Http_Request Plugin. In Jenkins select a build and click on the Configure option. In the configure option add a build step and select the Http_Request item.

Enter the information needed to point to xMatters in the build steps.

See the below list for the required information:

Input Value
URL This in an xMatters Inbound Integration URL. See instructions on how to create. Inbound Integration
HTTP mode POST
Pass build params to URL Yes
Request Body JSON formated body of Jenkins Environmental values available to the http_plugin. Jenkins Set Environment Variables

xMatters set up

  1. Import the Communication Plan (see files). If this step is done you can skip steps 2 and 3.
  2. Create a new Shared Library and add the code from the JenkinsLibrary.js file.
  3. Create (In|Out)bound integration and add the code from the JenkinsIB.js file.
  4. Configure the xMatters Endpoints. xMatters Endpoints
  5. Create a DevOps group in xMatters and add your self to the group. xMatters Groups. The name of the DevOps group can be changed in the Inbound IB script.

Testing

Run a Build in Jenkins. You should see in the console, Jenkins executing the HTTP_Request Build step and a status of 202.

A message should come through on your devices. Which ever devices you have configured in xMatters.

Troubleshooting

View xMatters Activity Stream to determine issues with Jenkins connectivity.

Releases

No releases published

Packages

No packages published