LoginSignup
0
4

More than 5 years have passed since last update.

GitLabからRocket.Chatへの通知連携

Last updated at Posted at 2018-12-13

概要

GitLabからhookし、結果をRocket.Chatのチャンネルへ通知する。
公式:Integration GitLabを参考に作業を進める。

環境

  • GitLab Community Edition 11.0.5
  • Rocket.Chat 0.60.3

前提

Rocket.Chatの管理者権限を持っていること。

手順

  1. Rocket.Chat側のIncoming WebHookの設定
  2. GitLabのIntegrationsの設定

Rocket.Chat側のIncoming WebHookの設定

管理者権限を持つアカウントでログインする。
メニューから管理>サービス連携と遷移し、「新しいサービス連携」ボタンを押下する。

Incoming WebHookを選択する。
sss.png

各種設定を行い、「変更を保存」ボタンを押下する。
※Scriptは公式提供のJSファイルから持ってくる
無題の画像.png

Webhook URLとTokenを控えておく。
※ページを再読み込みしたらでてくる
webghook.png

GitLabのIntegrationsの設定

対象のプロジェクトを開く。

Setting >Integrationsを押下する。
Integrations.png

さきほど控えたWebhook URLとTokenを入力する。
url.png

トリガーとなる処理を選択する。

例)今回はパイプラインを選択
trigger.png

Add webhookを押下する。
場合によってはEnable SSL verificationのチェックを外す。
addwebhook.png

確認

設定内容が反映されていることを確認する。
Testから対象のトリガーを押下する。
test.png

Rocket.Chatへの通知を確認できる。
chat.png

0
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
4