Now, integrate the SonarQube
with Jenkins. To do this, first generate a token from the SonarQube UI (you might need to use Other CI
option).
Next, add a new stage (name the stage as per your choice) for SonarQube
to run a SonarQube analysis on your project devsecops-numeric-application
with maven
. You can add this stage under Unit Tests - JUnit and Jacoco
stage.
Make sure to push your changes to the git remote and wait for the Jenkins job to complete before hitting the check
button.
The build is failed. In log it says [e[1;31mERRORe[m] SonarQube server [https://30012-port-482288226a684589.labs.kodekloud.com] can not be reached
added this command mvn clean verify sonar:sonar
-Dsonar.projectKey=devsecops-numeric-application
-Dsonar.host.url=https://30012-port-482288226a684589.labs.kodekloud.com
-Dsonar.login=sqp_004be410dfa331524914bcde7c22a690e7cd50e9