Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Sonarqube Quality Gate inorder to sent email alert everytime there is low code coverage than thresold value

Tags:

sonarqube

SonarQube Quality Gate is a great feature but the only problem I am having is that we dont get email alert everytime there is low code coverage on new code less than quality gate thresold value.

For example: Quality Gate Thresold value for code coverage on new code < 80% send email alert

  • 1st analysis : code coverage is 85%
  • 2nd analysis : code coverage is 70% - email alert received.
    -- Quality gate status: Orange
    -- New quality gate threshold:Coverage on new code < 80 since
    ...
  • 3rd analysis : code coverage is 67% - no email alert is received.
  • 4th analysis : code coverage is 50% - no email alert is received.

The email alert is received only when the color/state changes from one to another. We would like to setup email alert for every analysis it runs and if the code coverage on new code is less than thresold value, trigger email.

like image 277
user3088354 Avatar asked Nov 09 '22 07:11

user3088354


1 Answers

Automated emails can be configured only for following points.

  1. Changes in issues assigned to any user or reported by user
  2. New false positives
  3. New issues
  4. New quality gate status (fail to pass and pass to fail)

Once there are any changes identified by Sonar Analysis in the above mentioned points , SonarQube will send emails to every member of the team.

for more details you can check the user profile.

like image 154
Abhijeet Kamble Avatar answered Jan 04 '23 02:01

Abhijeet Kamble