Setup SonarCloud for your repository
Go to https://sonarcloud.io/
Log in / signup with your github account
Click on “analyze new project”. You find this option when pressing the + on the upper right side of the menu bar:
When prompted to create an organisation, click on “Choose an organization on GitHub”
5. Choose your account and repository and click “Install”
6. Select the free plan
Configure GitHub Actions for SonarCloud integration
Go to your fork
Go to Settings → Secrets
3. Add the following repository secrets:
SONAR_ORGANIZATION
SONAR_PROJECT_KEY
SONAR_TOKEN
How to find your token, organization and project key:
In the SonarCloud projects overview, click “Configure analysis” for the TASKANA project
Select “Manually”
Select “Maven” and copy the token which can be found in the blurred section of the following image within the <sonar.login>-tag.
Now GitHub Actions should be configured and you can push a branch to get your SonarQube analysis on sonarcloud
Activate Branch / Pull Request Analysis
Navigate to Administration → General Settings → Pull Requests within your TASKANA project.
2. Select GitHub as the Provider
3. Add your repository identifier
Where to find new analyzed branches
After GitHub Actions successfully ran for your newly pushed branch, you can find the analysis in sonarcloud. Select your project and afterwards click on “master” in the top right corner, marked red in the following picture. There you will be able to select the desired branch analysis.