CloudBees action: Scan with SonarQube

1 minute read

If you already are 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

server-url

String

Yes

The SonarQube server URL.

username

String

Yes

The SonarQube username.

password

String

Yes

The SonarQube password.

language

String

No

The language of your Git repository code base. Refer to Supported languages.

Supported languages

Table 2. Supported languages with inputs
Supported language Input format

Go

LANGUAGE_GO

JavaScript

LANGUAGE_JS

Python

LANGUAGE_PYTHON

Usage example

In your YAML file, add:

      - name: Scan with SonarQube
        uses: cloudbees-io/sonarqube-sast-scan-code@v1
        with:
          server-url: ${{ vars.SONARQUBE_SERVER_URL }}
          username: ${{ secrets.SONARQUBE_USERNAME }}
          password: ${{ secrets.SONARQUBE_PASSWORD }}
          language: "LANGUAGE_GO"