Start FreeLog in
SonarCloud | Managing your projects | Administering your projects | Advanced administration | Integrating projects with Compass

Was this page helpful?

Integrating projects with Atlassian Compass

On this page

SonarCloud allows you to monitor the performance of your project from within your Atlassian Compass account. This can be done by simply using the SonarCloud Quality Gate application to add scorecards and metric cards to any of your components in Compass which tell you what the current status of your quality gate is.

A Scorecard is a set of criteria that you apply to a component to measure its health. The SonarCloud Quality Gate scorecard tells you whether your project’s quality gate is passing (100% score) or failing (0%), prompting you to address the root cause of the failure of your project. 

Integrating your project with Atlassian Compass

The SonarCloud Quality Gate app is already listed in the Atlassian Compass App Catalog.

Configuration of the app takes place within Atlassian Compass itself. Here are the main steps you need to complete setup of your project:

  • Create a user token in SonarCloud to authenticate SonarCloud to Atlassian Compass
  • Start the configuration process of the app
  • Add the token to complete authentication within Compass 
  • Add your SonarCloud project to your Compass component

Generating a SonarCloud user token

First of all, you need to create a user token in SonarCloud for which will be used to authenticate SonarCloud Quality Gate app to Atlassian Compass. To generate a token, to go Account > My Account > Security. There you can see a list of your existing tokens.

Enter a name for your token, for example, My Compass Token, and select Generate Token. Make sure to copy the token and save it immediately before you dismiss the notification or leave this screen. Otherwise, you may have to start the process again. You will need to enter this token during the configuration process later in Compass.

Configuring the SonarCloud Quality Gate app in Compass

Go to your Atlassian Compass account. 

Select Apps from the top navigation bar in Compass. Search for the SonarCloud Quality Gate app.

Select Configure. This takes you to the configuration page.

Select Allow AccessThis takes you to the authorization screen to allow SonarCloud access to your Atlassian account. 

Select Accept. The configuration screen appears.

Enter the user token you created and saved earlier in SonarCloud in the Access Token field and click Connect.

That's it! You are now configured and can add your projects to your Compass components.

Integrating SonarCloud projects with Atlassian Compass

You now need to go to your SonarCloud account and copy the URL of the project that you want to integrate with Compass. 

Then, go to Atlassian Compass > Components and select your component.

On your team's dashboard on the right hand side, enter the URL saved in the project field, along with a text to display as the name of your project. Then refresh your screen. 

Add your SonarCloud URL to the project list in Compass.

Once you have refreshed your screen, you can view the Scorecard and Metric for your project. The status of your project will be updated every hour and you'll receive a warning if your quality gate has failed in SonarCloud.

To remove an existing SonarCloud project from Atlassian Compass, just click on the X button to the right of the project field (highlighted above). 

You can also view the current ratings of your components under the Health tab in Compass. Under Health, there are sub-tabs for both Scorecards and Metrics.  There you can see a list of your apps and the components that the apps are applied to. 

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License