GithubHelp home page GithubHelp logo

djiwandou / sonar-slack-notifier-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sleroy/sonar-slack-notifier-plugin

0.0 0.0 0.0 1.55 MB

SonarQube plugin for sending notifications to Slack

License: Other

Shell 0.32% Java 99.68%

sonar-slack-notifier-plugin's Introduction

Warning

This project is a fork of the original work from https://github.com/kogitant/sonar-slack-notifier-plugin. I made modifications to keep it working for the latest versions of SonarQube.

Pre-requisites

The actual version is compiled for SonarQube v8.0 and JDK 11.

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.

Install

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/sleroy/sonar-slack-notifier-plugin/releases/ page. Download the

From sources

To build the plugin simply run

mvn clean package

Configuration

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.

As administrator, go to the general settings and configure the Sonar instance URL:

A new category Slack appears in the left menu:

Under it you can find the CKS Slack Notifier plugin configurations:

In the above example there is a Project Key to Slack Channel configuration for an example project. You can override the globally defined web-hook, if you like. Example use case: You want a project to notify a different Slack team.
The project key of any SonarQube project can be found in the project page (bottom right corner):

Wildcard support

The project key supports wildcards at the end. See sleroy#2

Only send notification when Quality Gate fails

Notifications can be sent for all Quality Gate statuses, or just for WARNING/ERROR statuses. See kogitant#1

Example messages posted to Slack

New bug introduced

All good

Works with

  • Tested with SonarQube 7.2 and 7.3 against Slack on 23.02.2019

Inspired by

Benefits from

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

sonar-slack-notifier-plugin's People

Contributors

astrebel avatar bitzl avatar dbsanfte avatar el95149 avatar kogitant avatar mlaffargue avatar poznachowski avatar sleroy avatar thibaut-sticky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.