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.
- 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!
- 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.
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 |
- Import the Communication Plan (see files). If this step is done you can skip steps 2 and 3.
- Create a new Shared Library and add the code from the JenkinsLibrary.js file.
- Create (In|Out)bound integration and add the code from the JenkinsIB.js file.
- Configure the xMatters Endpoints. xMatters Endpoints
- 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.
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.
View xMatters Activity Stream to determine issues with Jenkins connectivity.