Monitor SonarQube projects in Catalog with the Konnect UI

Uses: Catalog
TL;DR

Install the SonarQube integration in Konnect and authorize access with your SonarQube personal access token, then link a project to your Catalog service.

Prerequisites

If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.

  1. The following Konnect items are required to complete this tutorial:
    • Personal access token (PAT): Create a new personal access token by opening the Konnect PAT page and selecting Generate Token.
  2. Set the personal access token as an environment variable:

    export KONNECT_TOKEN='YOUR KONNECT TOKEN'
    

You need the Integration Admin role in Konnect to install and authorize Catalog integrations.

You need to configure the following in SonarQube Cloud:

SonarQube Server isn’t supported.

Configure the SonarQube integration

Before you can discover SonarQube projects in Catalog, you must configure the SonarQube integration.

  1. In the Konnect sidebar, click Catalog.
  2. In the Catalog sidebar, click Integrations.
  3. Click SonarQube.
  4. Click Add SonarQube instance.
  5. In the SonarQube API key field, enter your SonarQube personal access token.
  6. In the Display name field, enter SonarQube.
  7. In the Instance name field, enter sonarqube.
  8. Click Save.

Create a Catalog service and map the SLO resources

Now that your integration is configured, you can create a Catalog service to map the ingested projects.

In this tutorial, we’ll refer to your ingested SonarQube project as billing-project.

  1. In the Konnect sidebar, click Catalog.
  2. In the Catalog sidebar, click Services.
  3. Click New service.
  4. In the Display Name field, enter Billing Service.
  5. In the Name field, enter billing-service.
  6. Click Create.
  7. Click Map Resources.
  8. Select billing-project.
  9. Click Map 1 Resource.

Your integration projects are now discoverable from one Catalog service.

You may need to manually sync your SonarQube integration for resources to appear. From the Konnect UI by navigating to the SonarQube integration you just installed and selecting Sync Now from the Actions dropdown menu.

Validate the mapping

To confirm that the SonarQube resource is now mapped to the intended service, navigate to the service:

  1. In the Konnect sidebar, click Catalog.
  2. In the Catalog sidebar, click Services.
  3. Click the Billing Service service.
  4. Click the Resources tab.

You should see the billing-project resource listed.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!