Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/styles/base/Dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ slos
SLT_Enc
sni
snis
sonarqube
Splunk
Splunk
ssl
Expand Down
1 change: 1 addition & 0 deletions app/_data/schemas/frontmatter/tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
"slack",
"slsa",
"solace",
"sonarqube",
"sso",
"statsd",
"status",
Expand Down
167 changes: 167 additions & 0 deletions app/_how-tos/monitor-sonarqube-projects-with-konnect-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
title: Monitor SonarQube projects in Catalog with the Konnect API
content_type: how_to
description: Learn how to connect a SonarQube project to your {{site.konnect_catalog}} service in {{site.konnect_short_name}} using the API.
products:
- catalog
works_on:
- konnect
tools:
- konnect-api
tags:
- integrations
- sonarqube
search_aliases:
- projects
- service catalog
related_resources:
- text: "{{site.konnect_catalog}}"
url: /catalog/
- text: Integrations
url: /catalog/integrations/
- text: SonarQube reference
url: /catalog/integrations/sonarqube/
- text: "Monitor SonarQube projects {{site.konnect_catalog}} with the {{site.konnect_short_name}} UI"
url: /how-to/monitor-sonarqube-projects-with-konnect-ui/
automated_tests: false
tldr:
q: How do I monitor SonarQube projects in {{site.konnect_short_name}}?
a: Install the SonarQube integration in {{site.konnect_short_name}} and authorize access with your SonarQube personal access token, then link a project to your {{site.konnect_catalog}} service.
prereqs:
inline:
- title: "{{site.konnect_short_name}} roles"
include_content: prereqs/service-catalog-integration-role
icon_url: /assets/icons/kogo-white.svg
- title: SonarQube
content: |
You need to configure the following in [SonarQube Cloud](https://www.sonarsource.com/products/sonarcloud/):
* A [SonarQube personal access token](https://docs.sonarsource.com/sonarqube-cloud/managing-your-account/managing-tokens).

{:.warning}
> SonarQube Server isn't supported.

Export your SonarQube personal access token:
```sh
export SONARQUBE_PAT='YOUR SONARQUBE PERSONAL ACCESS TOKEN'
```
icon_url: /assets/icons/third-party/sonarqube.svg
---

## Configure the SonarQube integration

Before you can discover [SonarQube projects](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects) in {{site.konnect_catalog}}, you must configure the SonarQube integration.

First, install the SonarQube integration:

<!--vale off-->
{% konnect_api_request %}
url: /v1/integration-instances
method: POST
status_code: 201
region: us
body:
integration_name: sonarqube
name: sonarqube
display_name: SonarQube
config: {}
{% endkonnect_api_request %}
<!--vale on-->

Export the ID of your SonarQube integration:

```sh
export SONARQUBE_INTEGRATION_ID='YOUR-INTEGRATION-ID'
```

Next, authorize the SonarQube integration with your SonarQube personal access token:

<!--vale off-->
{% konnect_api_request %}
url: /v1/integration-instances/$SONARQUBE_INTEGRATION_ID/auth-credential
method: POST
status_code: 201
region: us
body:
type: multi_key_auth
config:
headers:
- name: authorization
key: $SONARQUBE_PAT
{% endkonnect_api_request %}
<!--vale on-->

Once authorized, resources from your SonarQube account will be discoverable in the UI.

## Create a service in {{site.konnect_catalog}}

Create a service that you'll map to your SonarQube resources:

<!--vale off-->
{% konnect_api_request %}
url: /v1/catalog-services
method: POST
status_code: 201
region: us
body:
name: billing
display_name: Billing Service
{% endkonnect_api_request %}
<!--vale on-->

Export the service ID:

```sh
export SONARQUBE_SERVICE_ID='YOUR-SERVICE-ID'
```

## List SonarQube resources

Before you can map your SonarQube resources to a service in {{site.konnect_catalog}}, you first need to find the resources that are pulled in from SonarQube:

<!--vale off-->
{% konnect_api_request %}
url: /v1/resources?filter%5Bintegration.name%5D=sonarqube
method: GET
region: us
status_code: 200
{% endkonnect_api_request %}
<!--vale on-->

{:.info}
> You may need to manually sync your SonarQube integration for resources to appear. From the {{site.konnect_short_name}} UI by navigating to the SonarQube integration you just installed and selecting **Sync Now** from the **Actions** dropdown menu.

Export the resource ID you want to map to the service:

```sh
export SONARQUBE_RESOURCE_ID='YOUR-RESOURCE-ID'
```

## Map resources to a service

Now, you can map the SonarQube resource to the service:

<!--vale off-->
{% konnect_api_request %}
url: /v1/resource-mappings
method: POST
status_code: 201
region: us
body:
service: billing
resource: $SONARQUBE_RESOURCE_ID
{% endkonnect_api_request %}
<!--vale on-->


## Validate the mapping

To confirm that the SonarQube resource is now mapped to the intended service, list the service’s mapped resources:

<!--vale off-->
{% konnect_api_request %}
url: /v1/catalog-services/$SONARQUBE_SERVICE_ID/resources
method: GET
status_code: 200
region: us
{% endkonnect_api_request %}
<!--vale on-->
87 changes: 87 additions & 0 deletions app/_how-tos/monitor-sonarqube-projects-with-konnect-ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: Monitor SonarQube projects in Catalog with the {{site.konnect_short_name}} UI
content_type: how_to
description: Learn how to connect a SonarQube project to your {{site.konnect_catalog}} service in {{site.konnect_short_name}} using the UI.
products:
- catalog
works_on:
- konnect
tags:
- integrations
- sonarqube
search_aliases:
- project
- service catalog
related_resources:
- text: "{{site.konnect_catalog}}"
url: /catalog/
- text: Integrations
url: /catalog/integrations/
- text: SonarQube reference
url: /catalog/integrations/sonarqube/
- text: "Monitor SonarQube projects {{site.konnect_catalog}} with the {{site.konnect_short_name}} API"
url: /how-to/monitor-sonarqube-projects-with-konnect-api/
automated_tests: false
tldr:
q: How do I monitor SonarQube projects in {{site.konnect_short_name}}?
a: Install the SonarQube integration in {{site.konnect_short_name}} and authorize access with your SonarQube personal access token, then link a project to your {{site.konnect_catalog}} service.
prereqs:
inline:
- title: "{{site.konnect_short_name}} roles"
include_content: prereqs/service-catalog-integration-role
icon_url: /assets/icons/kogo-white.svg
- title: SonarQube
content: |
You need to configure the following in [SonarQube Cloud](https://www.sonarsource.com/products/sonarcloud/):
* A [SonarQube personal access token](https://docs.sonarsource.com/sonarqube-cloud/managing-your-account/managing-tokens).

{:.warning}
> SonarQube Server isn't supported.
icon_url: /assets/icons/third-party/sonarqube.svg
---

## Configure the SonarQube integration

Before you can discover [SonarQube projects](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects) in {{site.konnect_catalog}}, you must configure the SonarQube integration.

1. In the {{site.konnect_short_name}} sidebar, click **Catalog**.
1. In the Catalog sidebar, click **[Integrations](https://cloud.konghq.com/us/service-catalog/integrations)**.
1. Click **SonarQube**.
1. Click **Add SonarQube instance**.
1. In the **SonarQube API key** field, enter your SonarQube personal access token.
1. In the **Display name** field, enter `SonarQube`.
1. In the **Instance name** field, enter `sonarqube`.
1. Click **Save**.

## Create a {{site.konnect_catalog}} service and map the SLO resources

Now that your integration is configured, you can create a {{site.konnect_catalog}} service to map the ingested projects.

{:.info}
> In this tutorial, we'll refer to your ingested SonarQube project as `billing-project`.

1. In the {{site.konnect_short_name}} sidebar, click [**{{site.konnect_catalog}}**](https://cloud.konghq.com/service-catalog/).
1. In the Catalog sidebar, click **Services**.
1. Click **New service**.
1. In the **Display Name** field, enter `Billing Service`.
1. In the **Name** field, enter `billing-service`.
1. Click **Create**.
1. Click **Map Resources**.
1. Select `billing-project`.
1. Click **Map 1 Resource**.

Your integration projects are now discoverable from one {{site.konnect_catalog}} service.

{:.info}
> You may need to manually sync your SonarQube integration for resources to appear. From the {{site.konnect_short_name}} 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 {{site.konnect_short_name}} sidebar, click [**{{site.konnect_catalog}}**](https://cloud.konghq.com/service-catalog/).
1. In the {{site.konnect_catalog}} sidebar, click **Services**.
1. Click the **Billing Service** service.
1. Click the **Resources** tab.

You should see the `billing-project` resource listed.
13 changes: 13 additions & 0 deletions app/_landing_pages/catalog/integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@ rows:
url: "/how-to/monitor-dynatrace-slos-with-konnect-api/"
- text: Tutorial ({{site.konnect_short_name}} UI)
url: "/how-to/monitor-dynatrace-slos-with-konnect-ui/"
- blocks:
- type: card
config:
title: SonarQube
description: Connect SonarQube SaaS projects directly to your {{site.konnect_catalog}} services.
icon: /assets/icons/third-party/sonarqube.svg
ctas:
- text: Reference
url: "/catalog/integrations/sonarqube/"
- text: Tutorial ({{site.konnect_short_name}} API)
url: "/how-to/monitor-sonarqube-projects-with-konnect-api/"
- text: Tutorial ({{site.konnect_short_name}} UI)
url: "/how-to/monitor-sonarqube-projects-with-konnect-ui/"

- header:
type: h2
Expand Down
9 changes: 9 additions & 0 deletions app/assets/icons/third-party/sonarqube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading