Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.
Depending on your plugin configuration and how you run procedures, the Differences in plugin UI behavior. field may behave differently in the CloudBees CD/RO UI. For more information, refer to |
CollectReportingData
Collects reporting data from SonarQube and sends it to the CloudBees CD/RO reporting server.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Preview mode |
This mode is provided to let you perform a WHAT IF analysis before enabling automatic reporting. If selected, no metadata is set and reports are not sent to the reporting server. Instead, detailed information about each object retrieved from SonarQube that includes transformation, mapping, and payload, is included in the summary logs. |
Project key |
Required. The project key that is unique for each project in SonarQube. |
File prefix |
If provided, the matching string is removed from the file path before sending the report.
For example, if the file path is |
Field mapping |
Allows you to place custom fields to the payload or modify payload values.
For example, |
Transform script |
Allows you to provide a Perl script for payload customization.
This method is invoked by a plugin with two parameters.
The first parameter is the context object and the second parameter is the payload object.
Since EC-SonarQube-1.5.2.0 sends two types of reports, the payload is a hash reference with build and payload sections.
The method should be named
|
Metadata property path |
The property sheet where run metadata is stored.
If omitted, |
Base URL for drill-down |
The base URL for SonarQube. If empty, it is set to |
Debug |
If selected, the summary logs are written with the highest verbosity for the entire procedure. |
Get Last SonarQube Metrics
Retrieves the last metrics from SonarQube based on specified parameters.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Sonar task ID |
The task ID that is passed to this procedure from the run of SonarScanner, initiated by third-party software. If it is set, this procedure waits for SonarQube to process the task, download analysis data, and process metrics. If this parameter is not passed, then only the metrics check for the specified SonarQube project is ran. |
Project key |
Required. The project key that is unique for each project in SonarQube. |
Project name |
Required. The name of the project that is displayed in the SonarQube web interface. |
Project version |
The project version in SonarQube. |
Sonar timeout |
The timeout, in minutes, to wait for the task to be completed. The default timeout is 60 minutes. |
Type of stored result |
Set the result property format. |
Property to store results |
Set the result property where run metadata is stored.
If omitted, |
Metrics: Complexity |
The metrics to store. The options are All, New, or None. |
Metrics: Documentation |
The metrics to store. The options are All, New, or None. |
Metrics: Duplications |
The metrics to store. The options are All, New, or None. |
Metrics: Issues |
The metrics to store. The options are All, New, or None. |
Metrics: Maintainability |
The metrics to store. The options are All, New, or None. |
Metrics: QualityGates |
The metrics to store. The options are All, New, or None. |
Metrics: Reliability |
The metrics to store. The options are All, New, or None. |
Metrics: Security |
The metrics to store. The options are All, New, or None. |
Metrics: General |
The metrics to store. The options are All, New, or None. |
Metrics: Tests |
The metrics to store. The options are All, New, or None. |
Initiate Scanning Process
Initiates a scanning process with specified parameters.
Input parameters
Parameter | Description | ||
---|---|---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
||
Work directory |
Set the working directory. |
||
Source encoding |
Set the source file encoding. For example, ISO-8859-1. |
||
Project key |
Required. The project key that is unique for each project in SonarQube. |
||
Project name |
Required. The name of the project that is displayed in the SonarQube web interface. |
||
Project version |
Required. The project version in SonarQube. |
||
Local path to sources |
Required. Comma-separated paths to directories that contain source files. For example, |
||
Sonar timeout |
The timeout, in minutes, to wait for the task to be completed. The default timeout is 60 minutes. |
||
Custom values for SonarScanner |
The SonarScanner custom settings. For example, |
||
Enable SonarScanner debug mode |
Enable debug mode for SonarScanner. |
||
Heap space (MB) |
The heap size, in megabytes. For example, 512.
|
||
Type of stored result |
Set the result property format. |
||
Property to store results |
Set the result property where run metadata is stored.
If omitted, |
Run Sonar Scanner
Runs SonarQube Scanner with specified parameters.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Work directory |
Set the working directory. |
Source encoding |
Set the source file encoding. For example, ISO-8859-1. |
Project key |
Required. The project key that is unique for each project in SonarQube. |
Project name |
Required. The name of the project that is displayed in the SonarQube web interface. |
Project version |
Required. The project version in SonarQube. |
Local path to sources |
Required. Comma-separated paths to directories that contain source files. For example, |
Sonar timeout |
The timeout, in minutes, to wait for the task to be completed. The default timeout is 60 minutes. |
Custom values for SonarScanner |
The SonarScanner custom settings. For example, |
Enable SonarScanner debug mode |
Enable debug mode for SonarScanner. |
Heap space (MB) |
The heap size, in megabytes. For example, 512.
Set this property if you get Java heap space or |
Type of stored result |
Set the result property format. |
Property to store results |
Set the result property where run metadata is stored.
If omitted, |
Metrics: Complexity |
The metrics to store. The options are All, New, or None. |
Metrics: Documentation |
The metrics to store. The options are All, New, or None. |
Metrics: Duplications |
The metrics to store. The options are All, New, or None. |
Metrics: Issues |
The metrics to store. The options are All, New, or None. |
Metrics: Maintainability |
The metrics to store. The options are All, New, or None. |
Metrics: QualityGates |
The metrics to store. The options are All, New, or None. |
Metrics: Reliability |
The metrics to store. The options are All, New, or None. |
Metrics: Security |
The metrics to store. The options are All, New, or None. |
Metrics: General |
The metrics to store. The options are All, New, or None. |
Metrics: Tests |
The metrics to store. The options are All, New, or None. |