How to put the condition for sonarqube coverage not reaches 80% then build will goes fail

Hi ,

Can you please help me on, How to put the condition if coverage not reaches 80% in sonarqube then we suppose to fail build process.

Can you please guide me on which are the steps needs to follow. I’m new for sonarqube…

Note:- Java web base project (uses Java, Maven)

Thank you,
Chiranjeevi Kunchala


Your first step is to create a new Quality Gate that includes a condition on overall code. Then you need to make your build process wait for the Quality Gate results to be available. Without knowing anything about your process, I can’t tell you exactly how to do that, but it’s documented for Jenkins.