CloudBees action: Scan with SonarQube

1 minute read

If you are already running a centralized SonarQube instance, use this action to scan a Git repository with the SonarQube static analysis scanner. The data collected from the scans is available in your SonarQube reports, and the results are also displayed in the CloudBees platform analytics dashboards.

If you do not have SonarQube already installed, use the Scan with SonarQube bundled action instead.
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 1. Input details
Input name Data type Required? Description

url

String

Yes

The SonarQube server URL.

cmakeList-path

String

No

The CMakeFileList.txt file path for scanning C-family code languages. For more information, refer to the CMake documentation.

password

String

No

The SonarQube password.

ref

String

No

The branch name to be scanned.

token

String

No

The SonarQube access token.

username

String

No

The SonarQube username.

workspace-dir

String

No

The file path of the code to be scanned.

Usage examples

The following is a basic example for using the action:

- name: Scan with SonarQube uses: cloudbees-io/sonarqube-plugin@v1 with: server-url: https://my-sonarqube-server-url

In the following example, the cmakeList-path input is specified for a C-family code language scan:

- name: Scan C-family code with SonarQube uses: cloudbees-io/sonarqube-plugin@v1 with: server-url: ${{ vars.SONARQUBE_SERVER_URL }} cmakeList-path: https://path/to/my/CMakeFileList.txt