Before using the integration you'll need to generate a PagerDuty Integration API Key.
In PagerDuty, go to the "Service Directory":
Then choose the service you'd like Buildkite to send Change Events to:
Navigate to the "Integrations" tab and choose "Add a new integration"
Under "Integration Name", choose a memorable name for this integration. A good example could be the name of the Buildkite pipeline you intend to add this integration to.
For "Integration Type", choose "Buildkite".
Once you've filled out this form, select "Add Integration".
Copy the "Integration Key" from your Integrations list and use it in Sending Change Events from your pipeline.
By default, after you've added an Integration API Key, Buildkite will send PagerDuty a Change Event every build regardless of whether the build passed or failed.
To send Change Events only when the build passes, add a condition to your build configuration:
notify: - pagerduty_change_event: "636d22Yourc0418Key3b49eee3e8" if: "build.state == 'passed'"