Now that you’ve added the Pre-Deploy action to check for condition violations, you can easily integrate Rollbar and PagerDuty to the step.

When you integrate Rollbar, you’ll get error statuses directly from Rollbar. If you’ve implemented their Versions feature, errors are collected and links to Rollbar display in the Pre-Deploy report.

When you integrate with PagerDuty, you’ll see who’s currently on-call for the service configured in the lightstep.yml file.

To integrate, you add the Rollbar and PagerDuty API tokens to the Pre-Deploy step in the YAML file.

  1. Add your Rollbar and/or PagerDuty API tokens as GitHub secrets.

  2. In the workflow’s YAML file, add the Rollbar and PagerDuty API tokens as secrets to the step.

    1
    2
    3
    4
    5
    6
    7
    8
    
     # Run checks
     - name: Lightstep Pre-Deploy Check
       id: lightstep-predeploy
       uses: lightstep/lightstep-action-predeploy
       with:
         lightstep_api_key: ${ { secrets.LIGHTSTEP_API_KEY } }
         pagerduty_api_token: ${ { secrets.PAGERDUTY_API_TOKEN } }
         rollbar_api_token: ${ { secrets.ROLLBAR_API_TOKEN } }
    
  3. In the Lightstep YAML file, add a connection to the Rollbar environment, account, and project and to the PagerDuty service.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
     organization: MyOrg
     project: MyProject
    
     integrations:
       rollbar:
         environment: production
         account: lightstep
         project: Lightstep-Hipster-Shop
       pagerduty:
         service: PC8O0L3
    

That’s all that’s needed to integrate!


What Did We Learn?

  • You integrate Rollbar or PagerDuty to the Pre-Deploy action using the API keys for each in the workflow file.
  • You configure the integrations with Lightstep in the Lightstep YAML file.