Configuring code analysis for SonarQube Server with Bitbucket Cloud Pipelines

Time to complete icon1 hour to complete

Overview

This course demonstrates how to set up automated code scanning in your Bitbucket Cloud repositories by integrating Bitbucket Cloud Pipelines with SonarQube Server. This helps you seamlessly integrate code scanning, identify issues early, and ensure a high standard for your codebase.

Learning objectives

After completing this course, you’ll be able to:

  • Describe the elements of a Bitbucket Pipeline structure.
  • Define triggers in Bitbucket Pipelines that automatically start code analysis with SonarQube.
  • Configure a Bitbucket Pipelines workflow for code analysis with SonarQube.
  • Review SonarQube analysis results to understand code quality findings.
  • Customize your code analysis workflows for different project needs.
  • Apply troubleshooting tips to resolve common issues.

Key topics

  • Understanding Bitbucket Pipelines structure
  • Configuring Bitbucket Pipelines
  • Setting up a basic code analysis workflow in Bitbucket Pipelines
  • Initiating your code analysis
  • Applying SonarQube's code analysis across languages
  • Troubleshooting common issues
  • Resources and best practices

Target audience

  • DevOps engineer
  • Developer
  • Engineering leader
  • Analyst

Prerequisites

  • SonarQube Server (Developer, Enterprise, or Data Center Edition)
  • Create Project global permission or Administer permission of a project
  • Execute Analysis permission in SonarQube
  • SonarQube global analysis token
  • The Server base URL must be set 
  • An active Bitbucket Cloud account
  • Administrative permissions to create and manage repository variables in Bitbucket Cloud
  • Existing Bitbucket Cloud workspace with at least one project and one repository 
  • Network connectivity that allows communication between SonarQube Server and Bitbucket Cloud