Skip to content

Latest commit

 

History

History
77 lines (57 loc) · 3.67 KB

README.md

File metadata and controls

77 lines (57 loc) · 3.67 KB

Pagerduty Orb CircleCI Build Status CircleCI Orb Version GitHub license CircleCI Community

Easily integrate custom Pagerduty notifications into your CircleCI projects. Create custom alert incidents for any job failure or success.

Learn more about Orbs.

Usage

Example config:

version: 2.1

orbs:
  pagerduty: amanjain97/[email protected]/*

jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - pagerduty/<command>

[email protected] from the amanjain97 namespace is imported into the config.yml as pagerduty and can then be referenced as such as any job.

Commands

notify-on-failure

Create an incident when a CircleCI job is failed

Parameter Type Default Description
from_account string '' he email address of a valid user associated with the account making the request.
incident_title string '$CIRCLE_JOB job has caused an incident' Enter custom title.
incident_description string '' Enter the string describing the incident.
priority string '' The priority of this incident.
urgency enum 'low' The urgency of the incident and it can be high or low.
incident_key string '' A string which identifies the incident. Sending subsequent requests referencing the same service and with the same incident_key will result in those requests being rejected if an open incident matches that incident_key.
escalation_policy string '' Delegate this incident to the specified escalation policy. Cannot be specified if an assignee is given.
service string '' The incident will be created on this service.
apitoken string '${PAGERDUTY_APITOKEN}' Enter either your Pagertduty API token or use the CircleCI UI to add your token under the 'PAGERDUTY_APITOKEN' env var

Example:

version: 2.1

orbs:
  pagerduty: amanjain97/[email protected]/*

jobs:
    docker:
      - image: <docker image>
    steps:
      - pagerduty/notify-on-failure:
          service: "PB73G4C"
          from_account: "[email protected]"
          urgency: "high"
          apitoken: "hbh94380F3902_y" # or set in environment variables using Circle CI 

Help

How to get your Pagerduty API Token

Full instructions can be found at Pagerduty documentation: https://support.pagerduty.com/docs/generating-api-keys

How to setup the service ID

Check Pagerduty docs

Contributing

We welcome issues to and pull requests against this repository! For further questions/comments about this or other orbs, visit CircleCI's Orbs discussion forum.

License

This project is licensed under the MIT License - read LICENSE file for details.

Star and watch

Watch this repository for updates and please give a star if you are using it or find it useful.