1. Home
  2. Integrations
  3. Jenkins Integration Guide – VictorOps

Jenkins Integration Guide – VictorOps

With hundreds of plugins in the Update Center, Jenkins integrates with practically every tool in the continuous integration and continuous delivery toolchain. The VictorOps integration with Jenkins provides realtime contextual information regarding your builds directly into the timeline. The following guide will walk you through this simple to implement integration.

In VictorOps

From the main timeline go to Settings then Integrations.
jenkins1

Under “Incoming Alerts” select the REST Endpoint option.

jenkins2

Copy the REST endpoint URL to your clipboard.

jenkins3

In Jenkins

First, select the build or deployment you want to add VictorOps notifications for. Then select Configure.

jenkins4

Under “Build” select Add build step then Execute shell.

jenkins5

Paste the following cURL command into the “Command” box. Make sure to replace the “VICTOROPS_REST_ENDPOINT_URL” with the URL you copied from VictorOps.

curl -X POST --header 'Accept: application/json' --data '{ "entity_id": "'${BUILD_NAME}'", "message_type": "INFO", "state_message": "Jenkins Build: '${BUILD_DISPLAY_NAME}' is underway", "BUILD_ID": "'${BUILD_ID}'" }''VICTOROPS_REST_ENDPOINT_URL'

If you wish to add additional Jenkins variables please see the available list by selecting the link below the Command Box:

jenkins6

Make sure to save your configuration and you are done.

 

Updated on February 10, 2017

Was this article helpful?

Related Articles