The following plugin provides functionality available through
Pipeline-compatible steps. Read more about how to integrate steps into your
Pipeline in the
Steps
section of the
Pipeline Syntax
page.
This setting allow to determine who will be notified in case there are several SonarQube issues matching filter settings found in particular commit.
An e-mails sent to recipients will contain review information: title of review and list of comments (issues). Recipient settings:
* None - No one;
* Owner - Owner (i.e. author of the commit);
* Owner and Reviewers - Owner (i.e. author of the commit) and all Reviewers (people who was added to reviewer list of the commit);
* All - everyone in the project list.
This setting allow to determine who will be notified in case if the build got a negative score due to issues matching score filter settings are found. An e-mails sent to recipients will contain review information: title of review and list of comments (issues). Recipient settings:
* None - No one;
* Owner - Owner (i.e. author of the commit);
* Owner and Reviewers - Owner (i.e. author of the commit) and all Reviewers (people who was added to reviewer list of the commit);
* All - everyone in the project list.
noIssuesNotificationRecipient : String
noIssuesNotificationRecipient : String (optional)
This setting allow to determine who will be notified in case there are no SonarQube issues matching filter settings found in particular commit.
An e-mails sent to recipients will contain review information: title of review. Recipient settings:
* None - No one;
* Owner - Owner (i.e. author of the commit);
* Owner and Reviewers - Owner (i.e. author of the commit) and all Reviewers (people who was added to reviewer list of the commit);
* All - everyone in the project list.
overrideCredentials : boolean (optional)
path : String (optional)
postScore : boolean (optional)
projectPath : String (optional)
reviewConfig (optional)
Nested Object
commentType
commentType (optional)
Posted review comments can be of one of the following types :
Standard - The usual review comment that everyone use.
Robot - Available since Gerrit 2.14. Review comment type to be used by robots. See robot comment documentation for more details.
Values:STANDARD, ROBOT
issueCommentTemplate : String
issueCommentTemplate : String (optional)
This text will appear as comment for a line with SonarQube issue in Gerrit review.
There are some tags available:
* <key> - will be replaced with issue key;
* <component> - will be replaced with issue component info;
* <message> - will be replaced with issue message;
* <severity> - will be replaced with issue severity;
* <rule> - will be replaced with issue rule name;
* <rule_url> - will be replaced with link to rule description on SonarQube if SonarQube URL is provided in SonarQube settings section or rule name if URL is not provided;
* <status> - will be replaced with issue status;
* <creation_date> - will be replaced with issue creation date.
Please note that only filtered by severity level issues and their counts will be shown in report.
issueFilterConfig
issueFilterConfig (optional)
Issue filter to specify issues to be commented in Gerrit
Nested Object
changedLinesOnly : boolean
changedLinesOnly : boolean (optional)
Only changed in current commit lines to be commented by Gerrit when checked. Modified files to be commented with all issues if this control unchecked.
excludedPathsGlobPattern : String
excludedPathsGlobPattern : String (optional)
includedPathsGlobPattern : String
includedPathsGlobPattern : String (optional)
newIssuesOnly : boolean
newIssuesOnly : boolean (optional)
Only new SonarQube issues to be commented in Gerrit when checked. Modified files to be commented with all corresponding issues when unchecked.
severity : String
severity : String (optional)
Minimum level of SonarQube severity to be reported to Gerrit.
noIssuesTitleTemplate : String
noIssuesTitleTemplate : String (optional)
This text will appear as title of Gerrit review in case when no issues matching filter settings found.
There are some tags available:
* <info_count> - will be replaced with count of issues having INFO severity level;
* <minor_count> - will be replaced with count of issues having MINOR severity level;
* <major_count> - will be replaced with count of issues having MAJOR severity level;
* <critical_count> - will be replaced with count of issues having CRITICAL severity level;
* <blocker_count> - will be replaced with count of issues having BLOCKER severity level;
* <min_minor_count> - will be replaced with count of issues having MINOR severity level or higher;
* <min_major_count> - will be replaced with count of issues having MAJOR severity level or higher;
* <min_critical_count> - will be replaced with count of issues having CRITICAL severity level or higher;
* <total_count> - will be replaced with total count of issues.
Please note that only filtered by severity level issues and their counts will be shown in report.
omitDuplicateComments : boolean
omitDuplicateComments : boolean (optional)
someIssuesTitleTemplate : String
someIssuesTitleTemplate : String (optional)
This text will appear as title of Gerrit review in case when there are several issues matching filter settings found.
There are some tags available:
* <info_count> - will be replaced with count of issues having INFO severity level;
* <minor_count> - will be replaced with count of issues having MINOR severity level;
* <major_count> - will be replaced with count of issues having MAJOR severity level;
* <critical_count> - will be replaced with count of issues having CRITICAL severity level;
* <blocker_count> - will be replaced with count of issues having BLOCKER severity level;
* <min_minor_count> - will be replaced with count of issues having MINOR severity level or higher;
* <min_major_count> - will be replaced with count of issues having MAJOR severity level or higher;
* <min_critical_count> - will be replaced with count of issues having CRITICAL severity level or higher;
* <total_count> - will be replaced with total count of issues.
Please note that only filtered by severity level issues and their counts will be shown in report.
scoreConfig (optional)
Nested Object
category : String
category : String (optional)
This field describes under what category score will appear in Gerrit. This category should match one of existent Gerrit categories.
issueFilterConfig
issueFilterConfig (optional)
Issue filter to specify issues to affect score in Gerrit
Nested Object
changedLinesOnly : boolean
changedLinesOnly : boolean (optional)
Only changed in current commit lines to be commented by Gerrit when checked. Modified files to be commented with all issues if this control unchecked.
excludedPathsGlobPattern : String
excludedPathsGlobPattern : String (optional)
includedPathsGlobPattern : String
includedPathsGlobPattern : String (optional)
newIssuesOnly : boolean
newIssuesOnly : boolean (optional)
Only new SonarQube issues to be commented in Gerrit when checked. Modified files to be commented with all corresponding issues when unchecked.
severity : String
severity : String (optional)
Minimum level of SonarQube severity to be reported to Gerrit.
issuesScore : int
issuesScore : int (optional)
Score to be posted to Gerrit in case when there are SonarQube violations found
noIssuesScore : int
noIssuesScore : int (optional)
Score to be posted to Gerrit in case when there are no SonarQube violations found
severity : String (optional)
someIssuesToPostText : String (optional)
sonarURL : String (optional)
subJobConfigs (optional)
Array / List of Nested Object
autoMatch : boolean
autoMatch : boolean (optional)
projectPath : String
projectPath : String (optional)
Provides module prefix for a file path for multi-module projects
sonarReportPath : String
sonarReportPath : String (optional)
Path to SonarQube report on Jenkins server. Default value is "target/sonar/sonar-report.json"