Opsgenie を Travis CI と統合する

Travis CI のロゴ

Opsgenie が Travis CI ユーザーに提供するもの

OpsgenieTravis CI インテグレーションを使用して、Travis CI アラートを Opsgenie に転送します。Opsgenie はこれらのアラートのディスパッチャーとして機能して、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone、Android のプッシュ通知によって通知し、アラートが承認されるかクローズされるまでアラートをエスカレートします。

統合の機能性

  • Travis CI でプロジェクトのステータスが failing、broken、または errored になった場合、インテグレーションによって Opsgenie でアラートが自動的に作成されます。

  • Travis CI でステータスが passed または fixed になると、Opsgenie でアラートがクローズされます。

Opsgenie で Travis CI インテグレーションを追加する

Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。 このプランでは、[設定] の [統合] ページが利用できません。

  1. [チーム] に移動して自分のチームを選択します。

  2. 左側のナビゲーションで [統合] を選択し、[統合を追加] を選択します。

統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。

  1. [設定] > [統合] の順に移動します。Travis CI を検索して [追加] を選択します。 

  2. [応答者] フィールドによって Travis CI アラートの通知先を指定します。入力し始めると、オートコンプリートの候補が表示されます。

  3. Webhook の URL をコピーします。

  4. [Save Integration (統合の保存)] を選択します。

Travis CI での設定

  1. 監視する GitHub リポジトリを有効化して、GitHub で Travis CI のサービスフックを有効にします。

  2. .tracvis.yml ファイルをリポジトリに追加します。

  3. .travis.yml ファイルに次の設定を追加します。
    notifications: 
    webhooks: <webhook-url>

  4. .travis.yml ファイルをリポジトリのルートにコミットします。

ペイロードの例

The requestbin.com URL below 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

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。