Skip to main content

Add the SonarQube integration

The integration gives Astrolabe the address of your SonarQube and its token. You do it once, as an administrator.

Before you start: a SonarQube user token, see Create a SonarQube token.

How to​

1. Open the SonarQube integration​

  1. In the left sidebar, at the bottom, click Administration.
  2. Under PLATFORM, click Company connections.
  3. On the SonarQube card, click Configure.
  4. Top right, click Add Token.

2. Fill in the form​

FieldWhat to enterExample
NameA name of your choiceSonarQube
SonarQube base URLThe address of SonarQube, with https://https://sonar.example.com
SonarQube API KeyThe token you created

3. Test and save​

  1. Click Test connection. The form says Connection works: the source accepted the credentials.
  2. Click Add. Astrolabe restarts on its own, in a few seconds.

The token is in the list, with State set to Connected.

✅ Done. Next: Show SonarQube on a component.

You have several SonarQube​

Add one integration per SonarQube, and give each one an instance key.

  1. Repeat the steps above for each SonarQube.
  2. In the form, open Optional settings and fill in SonarQube instance key with a short name: letters, digits, ., _ and -.
SonarQubeNameSonarQube instance key
ProductionSonarQube prodprod
Other environmentsSonarQube devdev

A component then picks its SonarQube in its annotation: see Show SonarQube on a component.

The default SonarQube

A project key without an instance key is read from the integration whose instance key is default, otherwise from the first one in the list.