Slack を Pipelines と連携させる
Pipelines can notify Slack about pipeline and deployment results, repository wide, or only for specific branches in addition to the existing Bitbucket notifications.
Slack アプリのインストール
通知を設定するリポジトリを開きます。
Select Repository settings and select Slack, then Settings.
Slack の下の [接続] ボタンをクリックします。Slack にログインしていない場合は、Slack のログイン ダイアログが開かれる場合があります。
リポジトリに接続する Slack ワークスペースを選択します。
Slack に「ようこそ」メッセージが自動的に送信されます。
通知の設定
通知は、リポジトリ全体またはブランチ単位で構成できます。
Slack に接続しているいずれかのリポジトリを開きます。
Select Repository settings and select Slack, then Settings.
Select the down arrow to the right of the relevant branch, or add a new one if needed.
受信する通知を選択します。
ブランチごとに通知を設定すると便利です。たとえば、既定の main ブランチではパイプラインの修正通知を受信して、リポジトリ内のその他のブランチでは受信しないようにすることが重要な場合があります。
Pipelines では次のような通知を利用できます。
pipeline succeed
pipeline failed
pipeline fixed (失敗した試行の後に正常に完了した場合)
デプロイメントの成功
deployment failed (エラー ステータスを含む)
deployment stopped (同時実行による一時停止を含む)
既定の構成はここに表示されます。
注: build failed および build succeeded は外部サードパーティ ビルド ツール用であり、Bitbucket Pipeline 通知には含まれません。
Slack でパイプラインの失敗通知を受け取ったら、Slack のチャンネルから失敗したビルドを再実行できます。
この内容はお役に立ちましたか?