Meet101
Meet101

Reputation: 801

Jenkin's build result identifying "ERROR" if SonarQube quality gate is failed

I have sonarqube integrated with Jenkins thorugh sonarqube plugins. When i run a job in jenkins, It's passing without any issue. SonarQube also running scan without any issue. i can see new results in sonar server. My issue is, at the end of build in summery, If sonarqube quality gate is Failed in result, Jenkins is saying "ERROR" instead of "FAILED". is it normal behavior or it's something wrong in my build that is the reason, it's saying "ERROR". I have configured build steps for sonar as in picture 1. Output i am getting is "ERROR" as picture 2. enter image description hereenter image description here

as you can see in picture 2 at the end of build, it's says "ERROR". can someone please help me to understand. it's normal behavior or not? I have jenkins version 2.59 sonar server version 5.6 sonar-scanner-3.0.3.778 for MSBuild

Thank You!

Upvotes: 1

Views: 13130

Answers (1)

Khushi Vansh
Khushi Vansh

Reputation: 11

Yes. Jenkins build will fail, if we configure Quality Gates on a project. If you don't want the build to fail bases on Quality Gates output, you can add Post Build Actions. And can change the build status to unstable or successful using a Groovy Post Build Script.

Upvotes: 0

Related Questions