Travis CI と統合する
統合でできるようになること
Jira Service Management の Travis CI 統合を使用して、Travis CI アラートを Jira Service Management に転送します。Jira Service Management はこれらのアラートのディスパッチャーとして機能し、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone や Android のプッシュ通知による通知を行い、アラートが承認またはクローズされるまでアラートをエスカレーションします。
統合による機能
Travis CI でプロジェクトのステータスが failing、broken、または errored になった場合、統合を通じて Jira Service Management でアラートが自動的に作成されます。
Travis CI でステータスが passed または fixed になると、Jira Service Management でアラートがクローズされます。
統合をセットアップする
Travis CI は API 統合です。次の手順でセットアップを行います。
Jira Service Management で Travis CI 統合を追加する
Travis CI で統合を設定する
Travis CI 統合を追加する
The following capabilities are available in Jira Service Management Premium and Enterprise:
双方向の統合
Outgoing integrations at the team level
Integrations at a site level through Settings (icon) > Products (under Jira settings) > Operations
To access Jira Service Management Premium features, you must subscribe to a Service Collection Premium or Enterprise plan.
Adding an integration from your team’s operations page makes your team the owner of the integration. This means Jira Service Management only assigns the alerts received through this integration to your team.
Jira Service Management で Travis CI 統合を追加するには、次の手順に従います。
Next to Operations in the sidebar, select More actions (), then General configuration.
Select Integrations and then Add integration.
検索を実行して「Travis CI」を選択します。
次の画面で、統合の名前を入力します。
オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。
[Continue] を選択します。
この時点で、統合が保存されます。[統合を設定する手順] セクションを展開して Webhook URL をコピーします。
このキーは、後ほど Travis CI で統合を設定する際に使用します。[統合をオンにする] を選択します。
統合のために作成したルールは、統合をオンにした場合にのみ機能します。
Travis CI で統合を設定する
Travis CI と Jira Service Management の統合を設定するには、次の手順に従います。
モニタリングする GitHub リポジトリを選択して、GitHub で Travis CI のサービス フックを有効にします。
.tracvis.yml ファイルをリポジトリに追加します。
.travis.yml ファイルに次の設定を追加します。
notifications:
webhooks: <webhook-url>
先ほどコピーした Webhook URL を [webhooks] に貼り付けます。
.travis.yml ファイルをリポジトリのルートにコミットします。
ペイロードの例
次のペイロードの requestbin.com URL は RequestBin.com から生成できます。このサービスを使用して、無料の HTTPS エンドポイントを作成できます。そのエンドポイントに送信された HTTP リクエストは、関連するペイロードとヘッダーとともに記録されるため、Webhook から送信されたデータを確認してからアプリを設定して受信できます。
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
この内容はお役に立ちましたか?