/
Integrate with Travis CI

Integrate with Travis CI

What does the integration offer?

Use Compass's Travis CI Integration to forward Travis CI alerts to Compass. Compass acts as a dispatcher for these alerts and determines the right people to notify based on on-call schedules, notifies via email, text messages (SMS), phone calls, and iOS and Android push notifications, and escalates alerts until the alert is acknowledged or closed.

How does the integration work?

  • When the status of a project is failing, broken, or errored on Travis CI, an alert is created in Compass automatically through the integration.

  • When the status is passed or fixed on Travis CI, the alert is closed in Compass.

Set up the integration

Travis CI is an API integration. Setting it up involves the following steps:

  • Add a Travis CI integration in Compass

  • Configure the integration in Travis CI

Add a Travis CI integration

In this release, only incoming integrations are fully supported in the Standard plan, at a team level. To use outgoing integrations or the outgoing part of bidirectional integrations, upgrade to a higher subscription plan. There may be restrictions on how you can create and apply integration rules as well.

You can add this integration only from your team’s operations page. Adding an integration from your team’s operations page makes your team the owner of the integration. This means Compass only assigns the alerts received through this integration to your team.

To add a Travis CI integration in Compass, complete the following steps:

  1. Go to your team’s operations page.

  2. On the left navigation panel, select Integrations and then Add integration.

  3. Run a search and select “Travis CI”.

  4. On the next screen, enter a name for the integration.

  5. Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.

  6. Select Continue.
    The integration is saved at this point.

  7. Expand the Steps to configure the integration section and copy the webhook URL.
    You will use this key while configuring the integration in Travis CI later.

  8. Select Turn on integration.
    The rules you create for the integration will work only if you turn on the integration.

Configure the integration in Travis CI

To configure the integration of Travis CI with Compass, complete the following steps:

  1. Activate the service hook for Travis CI on Github by selecting the Github repositories to monitor.

  2. Add the .travis.yml file to the repository.

  3. Add the following configuration to the .travis.yml file.
    notifications:
    webhooks: <webhook-url>

  4. Paste the webhook URL copied previously into webhooks.

  5. Commit the .travis.yml file to the root of the repository.

Sample payload

The requestbin.com URL in the following payload can be generated from RequestBin.com. You can use the service to create a free HTTPS endpoint. Any HTTP requests sent to that endpoint will be recorded with the associated payload and headers so you can observe the data sent from our webhooks before configuring your application to accept it.

JSON

{ "id": 17413947, "repository": { "id": 1797493, "name": "travisci", "owner_name": "halixxxxxx", "url": "https://github.com/xxxxxxx/travisci" }, "number": "16", "config": { "language": "java", "jdk": [ "oraclejdk7", "openjdk7", "openjdk6" ], "notifications": { "webhooks": [ "https://[YOUR ENDPOINT ID].x.requestbin.com" ], "on_start": true }, ".result": "configured" }, "status": 1, "result": 1, "status_message": "Still Failing", "result_message": "Still Failing", "started_at": "2014-01-22T14:56:52Z", "finished_at": "2014-01-22T14:57:50Z", "duration": 53, "build_url": "https://travis-ci.org/halixxxx/travisci/builds/17413947", "commit": "b3e6b383453467613cfdab20a6ec2a80c9cb2867", "branch": "master", "message": "ddaax", "compare_url": "https://github.com/halixxxx/travisci/compare/59b70385cf7e...b3e6b3834534", "committed_at": "2014-01-22T14:56:29Z", "author_name": "halit", "author_email": "sistani@mail.com", "committer_name": "sistani", "committer_email": "sistani@mail.como" } Close