概要
パイプラインからSlack通知ができずハマったのでメモ。
結論
パイプラインスクリプト上で slackSend コマンドを召喚する。
引用:https://stackoverflow.com/questions/39140191/how-to-send-slack-notification-after-jenkins-pipeline-build-failed
調査
jenkinsでjobの結果をSlackに通知しようとした。
通常のジョブであれば、jenkinsのSlack Notification Pluginを入れて設定をすれば完結する。
が、パイプラインの設定にSlack Notificationの設定がない(というかビルド後の処理という項目がない)
ググると、パイプラインスクリプトでやるのがいいよ、とのこと。