Versions Compared

Key

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

...

Note

Please make sure that GitHub Action is enabled. See: Activate CI

Setup SonarCloud for your repository

1. Go to https://sonarcloud.io/

2. Log in / signup with your github account

3. Click on

...

“Analyze new project”. You find this option when pressing the + on the upper

...

left side of the menu bar:

...

4. When prompted to

...

select a repository, click on “Import another organization.”

...

5. Then click on “Choose an organization on GitHub”

...

56. Choose your account and repository and click “Install”

...

67. Select the free plan

...

Configure

...

GitHub Actions for SonarCloud integration

1. Go to

...

Go to More options → Settings

...

your fork

2. Go to Settings → Secrets

3. Add the following keys. Organisation and Project Key can be made public, the Token should not be made publicrepository 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 TASKANA project

...

Select “Manually”

...

Select “Maven” and . For the value of the SONAR-TOKEN, copy the token which can be found in the blurred section of the following image below “Configure the SONAR_TOKEN environment variable”.

...

The value for SONAR_ORGANIZATION can be found within the <sonar.login>-tag.

...

Now travis orginization> tag. The value for SONAR_PROJECT_KEY is in the arguments of the mvn command below.

...

Now GitHub Actions should be configured and you can push a branch to get your SonarQube analysis on SonarCloudsonarcloud

...

...

  1. 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 travis GitHub Actions successfully ran for your newly pushed branch, you can find the analysis in SonarCloud. Select your project and afterwards click on “master” “branches” in the menu on the top right corner, marked red in the following picture. There you will be able to select the desired branch analysis.Image Removed

...