I want to do the jenkins and sonar integration using groovy script.
I already installed all the necessary plugins in Jenkins (SonarQube Scanner, Sonar Quality Gates Plugin, SonarQube Scanner,
Quality Gates Plugin). I created the webhook in Sonar (http: // myserver-sonarqube: 8080 / sonarqube-webhook) and the same is receiving information payload
of jenkins when I run package mvn.
Follow my code:
However when I run the Job the result is the following:
java.lang.IllegalStateException: Unable to guess SonarQube task id and/or SQ server details. Please use the ‘withSonarQubeEnv’ wrapper to run your analysis.
I already configured the Sonar and Quality Gate in jenkins and still the error persists. Does anyone know how I can solve it?