Get started with Opsgenie as a user
Learn how to configure your profile, get notifications from Opsgenie and view on-call schedules.
The practice of continuous integration involves repeated automated testing and code merging with notifications to alert developers to problems in their code in real time. Codeship combines this with the practice of continuous delivery, which provides for regular code deployment once changes have passed automated tests. Essentially, when code is pushed to GitHub (or Bitbucket), Codeship rebuilds your application on its secure servers and runs your automated tests. If the tests fail, it notifies your development team via email or integration.
Use Opsgenie Codeship Integration to forward Codeship build alerts to Opsgenie. Opsgenie
determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls, and iOS & Android push notifications, and escalates alerts until the alert is acknowledged or closed.
When a build alert is created in Codeship, an alert is created in Opsgenie automatically through the integration.
If you're using Opsgenie's Free or Essentials plan or if you’re using Opsgenie with Jira Service Management's Standard plan, you can add this integration from your team dashboard only. The Integrations page under Settings is not available in your plan.
Go to Teams and select your team.
Select Integrations on the left navigation and then select Add integration.
Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.
Go to Settings > Integrations. Search for Codeship and select Add.
Specify who is notified of Codeship alerts using the Responders field. Auto-complete suggestions are provided as you type.
Select Save Integration.
To configure build notifications in Codeship, go to Project Settings and click on the Notifications tab.
To add more rules to an existing branch (or branch match), click add to the right of the branch name. To add rules for a new branch (or branch match), click the big new notification button at the bottom of the page.
To remove specific rule trigger for notifications, either disable it (use the toggle on the right-hand side) or delete it completely.
All rules apply to either “All Branches”, a names branch, or a branch match. If the field is left empty, the rule applies to all branches.
Additionally, all rules can select between started, failed, succeeded, and recovered as events that trigger a notification. Select at least one event in order to save the rule.
started -> sends a notification when a new build is triggered
failed -> sends a notification if a build fails for some reason
succeeded -> sends a notification if the build finishes successfully
recovered -> sends a notification if the previous build failed, but the current build succeeded
Codeship sends build data using Webhook Services
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"build": {
"build_url":"https://www.codeship.com/projects/102xx/builds/97xxxx",
"commit_url":"https://github.com/codeship/docs/
commit/96943xxxxxxxxxx",
"project_id":102xx,
"build_id":97xxxx,
"status":"testing",
# PROJECT_FULL_NAME IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE
"project_full_name":"codeship/docs",
"project_name":"codeship/docs",
"commit_id":"96943dc5xxxxxxxxxxxxxxxxxx",
"short_commit_id":"96xxx",
"message":"Merge pull request #34 from codeship/feature/shallow-clone",
"committer":"beanixxxx",
"branch":"master"
}
}
The status field has one of the following values:
initiated for newly started build
error for failed builds
success for passed builds
stopped for stopped builds
waiting for waiting builds
ignored for builds ignored because the account is over the monthly build limit
blocked for builds blocked because of excessive resource consumption
infrastructure_failure for builds which failed because of an internal error on the build VM
For more information, please refer to Codeship's Manage Notification and Codeship's Opsgenie Integration Doc
Was this helpful?