Easily integrate custom Pagerduty notifications into your CircleCI projects. Create custom alert incidents for any job failure or success.
Learn more about Orbs.
Example config:
version: 2.1
orbs:
pagerduty: amanjain97/pagerduty@x.y.z/*
jobs:
build:
docker:
- image: <docker image>
steps:
- pagerduty/<command>
pagerduty@1.0.0
from the amanjain97
namespace is imported into the config.yml as pagerduty
and can then be referenced as such as any job.
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/pagerduty@x.y.z/*
jobs:
docker:
- image: <docker image>
steps:
- pagerduty/notify-on-failure:
service: "PB73G4C"
from_account: "admin@org.com"
urgency: "high"
apitoken: "hbh94380F3902_y" # or set in environment variables using Circle CI
Full instructions can be found at Pagerduty documentation: https://support.pagerduty.com/docs/generating-api-keys
Check Pagerduty docs
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.
This project is licensed under the MIT License - read LICENSE file for details.
Watch this repository for updates and please give a star if you are using it or find it useful.