Versions Compared

Key

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

One of the main features of this app is that it supports you to do code reviews based on pull requests with Sonar. Sonar-based code reviews with pull requests depend on a build that analyzes the Git branches of a pull request separately. This can be done manually by setting Sonar's -Dsonar.branch, -Dsonar.branch.name or -Dsonar.pullRequest.key. But if you're using a branch-based Git workflow like Gitflow, you want this to be automated. Sonar for Bamboo is able to do this.

The following picture explains the workflow for Sonar-based code reviews together with Bitbucket Server and Bamboo and our two apps Sonar for Bitbucket Server and Sonar Include Code Quality for Bamboo (note that the basic workflow is the same when you are using another build server):

...

The workflow starts with a developer pushing code changes to a newly created feature branch (1)

Bitbucket Server triggers Bamboo which automatically (2) creates a plan branch if it is configured accordingly.

Sonar for Bamboo is able to run trigger the Sonar analysis for Maven, Gradle and SonarRunner based projects and publishes the build results are published on the SonarQube server (3).

The developer is notified (4) about the build results (e.g., by Slack) and creates a pull request (5).

Sonar for Bitbucket Server then shows all the useful metrics and bug hunting tools in Bitbucket Server's pull request view (6).

...