I'm using the tool Jenkins to build my projects and I have configured SonarQube with it to analyze my source code by adding the necessary steps to the Build definition.
I want to get the Quality Gate status of a specific project using Groovy PostBuild Plugin to trigger some actions when the QG status is "WARN". Is there any possible way to obtain the QG status like that :
Exemple:
{"projectStatus":{"status":"WARN","conditions":[{"status":"OK","metricKey":"blocker_violations","comparator":"GT","warningThreshold":"104","errorThreshold":"109","actualValue":"95"},{"status":"OK","metricKey":"critical_violations","comparator":"GT","warningThreshold":"72","errorThreshold":"76","actualValue":"62"},{"status":"OK","metricKey":"duplicated_lines_density","comparator":"GT","warningThreshold":"23.1","errorThreshold":"24.1","actualValue":"21.6"},{"status":"OK","metricKey":"major_violations","comparator":"GT","warningThreshold":"1210","errorThreshold":"1265","actualValue":"845"},{"status":"WARN","metricKey":"minor_violations","comparator":"GT","warningThreshold":"589","errorThreshold":"616","actualValue":"612"},{"status":"OK","metricKey":"complexity","comparator":"GT","warningThreshold":"1963","errorThreshold":"2052","actualValue":"1723"},{"status":"OK","metricKey":"sqale_rating","comparator":"GT","errorThreshold":"3","actualValue":"2"}],"periods":[{"index":1,"mode":"previous_version","date":"2018-04-18T11:05:47+0200","parameter":"3.0.3"}],"ignoredConditions":false}}