Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The SonarQube analysis has to be run triggered outside of Bitbucket. The most common scenario is an integration of the SonarQube analysis into the your build pipeline.

A typical Sonar analysis has the following stepsrecommended flow with Sonar for Bitbucket looks like:

  1. New code changes pushed to a branch, or a Bitbucket (or new pull request that has been created in Bitbucket

  2. The build pipeline is triggered and informed of the new changes

  3. A build is run, which triggers the Sonar analysisis created)

    1. Bitbucket triggers your build pipeline for code changes

  4. Your build pipeline must trigger the Sonar analysis

    1. and executes the SonarScanneror one of its build system-dependent alternatives.

    The results of the analysis are sent to SonarQube
    1. see below for required parameters

  5. SonarQube informs Sonar for Bitbucket over a webhook that Webhook about a new analysis is completereport.

    1. Sonar for Bitbucket annotates

    the
    1. existing pull

    request
    1. requests with the issues found in the analysis.

Whichever external system you use to execute the Sonar scan, you need to run it with the correct parameters for your SonarQube application. Use the analysis parameter matrix below to find yours.

...