Configure the webhook in Jenkins

Configure webhook endpoints so that Jenkins can use the endpoint to communicate with Incident Response.

Before you begin

Role required: Responder, Manager, or Administrator

You must use the latest Lightstep Incident Response plugin for Jenkins. The latest version of the plugin can be found here.

About this task

Note: While this integration with a third-party product is supported, the documentation here is based upon information provided by that third-party. More current information about the operation of that third-party’s system may be available from them directly.

Procedure

  1. Log in to your Jenkins application console.
  2. Navigate to Dashboard > Manage Jenkins > Manage Plugins.
  3. From the Plugin Manager, search for and install the Lightstep Incident Response plugin.
    Note: You must use the latest Lightstep Incident Response plugin for Jenkins. The latest version of the plugin can be found here.
    Jenkins plugin.
  4. From the Dashboard, click New Item.
  5. Enter a name for your project in the Enter an item name field.
  6. Select Freestyle project and click OK.
    Note: The Lightstep Incident Response plugin currently supports only Freestyle projects.
    Create an item.
  7. Enter your project details.
  8. Under Post-build Actions, select the Add post-build action list.
  9. Select Send alerts to Lightstep Incident Response.
    Send alerts to Lightstep Incident Response.
  10. In the Webhook URL field, enter the webhook URL copied from Incident Response.
  11. Under Select when to trigger alert, select the check boxes for the build statues for which you want alerts triggered in Incident Response and their respective alert priorities.
    Option Description
    When Build status is failure If selected, you will receive alerts in Incident Response when your Jenkins builds fail. Alert priority in Incident Response will be the priority selected for the option.
    When Build status is unstable If selected, you will receive alerts in Incident Response when your Jenkins build status is unstable. Alert priority in Incident Response will be the priority selected for the option.
    When Build status is aborted If selected, you will receive alerts in Incident Response when your Jenkins build is aborted. Alert priority in Incident Response will be the priority selected for the option.
    Resolve on Back-to-Normal If this option is selected, when your Jenkins build issues are resolved and the build completes successfully, alerts created in Incident Response are closed automatically.

    If this option is not selected, you will have to manually resolve the alert in Incident Response.

    Post-build actions.

  12. Click Save.
  13. If you want the Jenkins build URL to be available in your alerts in Incident Response, perform the following configuration:
    1. Navigate to Dashboard > Manage Jenkins > Configure System.
    2. Under Jenkins Location, in the Jenkins URL field, add the Jenkins Instance URL.

      Jenkins URL.

    Your alerts will have the direct link to the Jenkins build.

    Jenkins alert.

Results

  • Post-build results in Jenkins will trigger alerts in Incident Response.
  • A single alert is created with the status of Open with respect to a Jenkins job. For this job, the alert will keep getting updated with the next build results. Once the alert is closed in Incident Response, a new alert will be created for the same Jenkins job.
  • If the Resolve on Back-to-Normal option is selected, when the build is resolved in Jenkins, the alert status is changed to Closed in Incident Response.