Skip to content

Sonar plugin to send email and/or text messages after every analysis execution.

Notifications You must be signed in to change notification settings

M0rfic/sonar-analysis-report-plugin

 
 

Repository files navigation

/**

  • Copyright (C) 2013 JiteshDundas [email protected]
  • Licensed under the RPL License, Version 1.5 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  •     http://opensource.org/licenses/RPL-1.5
    
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. */

Analysis-Report Plugin:-

=====================

This plugin will send an email/sms after every analysis is completed.

Added the following functionalities to the plugin:-
=====================================================================

  1. PDF Report
  2. HTML based content with violations summary
  3. Image Logo
  4. Send SMS notifications

Downloads ======================================================================
You can download the JAR from https://github.com/jbdundas/sonar-analysis-report-plugin/blob/master/target/sonar-analysis-report-plugin-1.0.jar

You need to add the values of the email-related properties with their values in the General Settings:-

===================================================================== Set the value of the property -
1) sonar.jd.smptp.to (suggested to set this property from the project).
2) sonar.email.enabled(true if you want the email to be sent, else set to false)
3) sonar.jd.smptp.host
4) sonar.jd.smptp.set_ssl_on_connect
5) sonar.jd.smptp.sslport
6) sonar.jd.smptp.username
7) sonar.jd.smptp.password
8) sonar.jd.smptp.from
9) sonar.jd.smptp.subject
10) sonar.jd.smptp.message

Steps to Install:-
=====================================================================

  1. You can get the JAR from the zip version attached with the previous email on this thread or
    from target folder of this project's root directory in github.
  2. Download it into the SONAR_HOME/extensions/plugins directory
  3. Restart the Sonar server
  4. You will then have to define the properties as mentioned in the
    ReadMe.md above
  5. Note that you can define multiple To addresses from the project configuration
    file ( sonar-project.properties for Sonar Runner, build.xml for ant or pom.xml for maven ).
    This will supersede the value put for the same field from the global settings page and it will
    send an email accordingly.

Note:- A sample report can be seen at:-
sonarreport1368751371210_-847661506.pdf

SMS Notification:-


=========================================================================== You will need the following properties too:-
1) sonar.jd.sms.to - The phone number to which you wish to send the sms ( with country code ). Mandatory property.
2) sonar.jd.sms.to.provider - The name of the carrier for the sms . For e.g. AT&T, Verizon, etc. Optional property.
3) sonar.jd.sms.enabled - Is SMS sending enabled? True or False. Optional property.

You can find the exact name of your provider and other details on this page:- http://en.wikipedia.org/wiki/List_of_SMS_gateways

For e.g. to send an sms to an AT&T mobile number, use @txt.att.net .Also, for Verizon(US) mobile number, it will be @vtext.com

Note that the first and third property are mandatory while the second is optional if you have the entire string of mobile number as an email from the above link.

About

Sonar plugin to send email and/or text messages after every analysis execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%