- Create SonarQube server
- Initialize a simple hello-world springboot application
It is a self-managed tool that helps you deliver clean code by automating code reviews.
-
Log into the server and generate and copy token
-
Create a github repository and create repository action secrets.
SONAR_TOKEN
SONAR_HOST_URL
Note
: These will be used to authenticate your sonar server, in our case, its a an ec2 running on aws. -
Create .github/workflows/maven.yml workflow on your root directory of your source code
-
Copy and update the workflow from SonarQube website: https://docs.sonarsource.com/sonarqube/latest/devops-platform-integration/github-integration/
-
Push code into github