CKS Sonar Slack Notifier Plugin
SonarQube plugin for sending notifications to Slack
This plugin sends a Slack message of project analysis outcome to congired project specific slack channel. The plugin uses Incoming Web Hook as the integration mechanism with Slack.
The plugin must be placed in SONAR_HOME/extensions/plugins directory and SonarQube must be restarted.
Using latest release
You can find the latest release from https://github.com/kogitant/sonar-slack-notifier-plugin/releases/ page. Download the
To build the plugin simply run
mvn clean package
After the plugin has been installed, you need to configure it. Although SonarQube offers project level configurations for some plugins, they cannot be used with this plugin because it runs in the "server side", and only sees the global settings.
The project key supports wildcards at the end. See https://github.com/kogitant/sonar-slack-notifier-plugin/issues/2
Only send notification when Quality Gate fails
Notifications can be sent for all Quality Gate statuses, or just for WARNING/ERROR statuses. See https://github.com/kogitant/sonar-slack-notifier-plugin/issues/1
Example messages posted to Slack
New bug introduced
- Tested with SonarQube 6.1 against Slack on 2016.10.17
- Tested with SonarQube 6.1 against Mattermost 3.5.0 on 2017.01.02
SonarQube Plugin Development guides
Slack webhook integration and message formatting guides
Analyzing this project with unit test and integration test coverage
mvn clean jacoco:prepare-agent install -DskipITs=true mvn jacoco:prepare-agent-integration failsafe:integration-test mvn sonar-maven-plugin:sonar -Dsonar.host.url=http://localhost:9000