Skip to content

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

License

Notifications You must be signed in to change notification settings

amanjain97/Pagerduty-orb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/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.

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/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 

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages