Sonarqube

An integration guide for Sonarqube.

Overview

This guide details the integration between Rely.io and SonarQube, a popular platform for continuous code analysis and static code quality. Integrating SonarQube with Rely.io unlocks valuable benefits for your development workflow:

Enhanced Code Quality:

  • SonarQube provides comprehensive code analysis, identifying potential bugs, vulnerabilities, and code smells before deployment. This proactive approach streamlines development by minimizing issues that might arise later in the process.

  • Gain insights into code coverage and identify areas where additional testing efforts may be necessary.

Improved Development Efficiency:

  • Rely's integration with SonarQube allows you to centralize code quality data within your Rely environment. This facilitates easier access and analysis of quality metrics, streamlining team communication and collaboration.

  • Automate quality checks as part of your CI/CD pipeline, integrating seamlessly with Rely's existing functionalities.

Installation Guide

To configure the SonarQube integration within your Rely instance, follow these steps:

  1. Navigate to the Plugins section within your Rely dashboard within the Data Model section of the side panel.

  2. Click "Add Plugin" and select the SonarQube plugin.

  3. Complete the following fields in the provided form:

    • Webhook Secret: A secure, random string used to validate the authenticity of incoming data from SonarQube. Store it somewhere safe as it will be required at a later step.

    • API Token: Generate an API token of the desired type within your SonarQube instance (User > My Account > Security). Refer to SonarQube's documentation for more details on creating API tokens.

      • Global Tokens will allow Rely to ingest information regarding all projects.

      • User Tokens will allow Rely to ingest information about all projects your current user has access to.

    • Server URL: Specify the base URL of your SonarQube server instance. Ensure this URL matches the configuration settings within SonarQube itself.

  4. Hit "Copy Destination Webhook URL" before you proceed. Store it somewhere safe as it will be required at a later step.

  5. Click "Save".

  6. To finalize the connection between Rely and SonarQube, you need to create a webhook in SonarQube that allows requests from Rely.

    1. Access your SonarQube account

    2. Navigate to Project Settings > Webhooks > Create

    3. Provide a name to your webhook (e.g. Rely Integration)

    4. Fill in the URL with the one provided by Rely in an earlier step.

    5. Fill in the Secret with the one provided by Rely in an earlier step.

    6. Hit "Create".

    7. Refer to SonarQube's documentation for more details

  7. After this, Rely will automatically perform the following tasks:

    • Extend your Data Model with Project, Issue and Analysis blueprints

    • Pull corresponding entities from your SonarQube to backfill your catalog

    • Add automation rules to feed your Services and Repos with information from their corresponding Project

    • Watch for changes in SonarQube to keep your catalog up-to-date.

Rely's support team is always available to assist you with any integration-related questions. Feel free to reach out through our support channels.

By following these steps, you can effectively leverage the SonarQube integration and gain valuable insights into your code quality within your Rely environment.

Last updated