diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2019-11-04 10:03:44 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-11-08 20:21:13 +0100 |
commit | 4fa06438df258d10839ca955fb8c9bbf74249e73 (patch) | |
tree | 2040b2b7bc54b548f8e01ebbb16dd8a59094a002 | |
parent | 10e04a8aafbabd665f1f668395b97fd43555c757 (diff) | |
download | sonarqube-4fa06438df258d10839ca955fb8c9bbf74249e73.tar.gz sonarqube-4fa06438df258d10839ca955fb8c9bbf74249e73.zip |
SONAR-12630 Log dashboard link in case Quality Gate has failed
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/qualitygate/QualityGateCheck.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/qualitygate/QualityGateCheck.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/qualitygate/QualityGateCheck.java index 9b320f86f8a..52e330d1bf8 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/qualitygate/QualityGateCheck.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/qualitygate/QualityGateCheck.java @@ -48,17 +48,17 @@ public class QualityGateCheck implements Startable { private final DefaultScannerWsClient wsClient; private final GlobalAnalysisMode analysisMode; - private final CeTaskReportDataHolder reportMetadataHolder; + private final CeTaskReportDataHolder ceTaskReportDataHolder; private final ScanProperties properties; private long qualityGateTimeoutInMs; private boolean enabled; - public QualityGateCheck(DefaultScannerWsClient wsClient, GlobalAnalysisMode analysisMode, CeTaskReportDataHolder reportMetadataHolder, + public QualityGateCheck(DefaultScannerWsClient wsClient, GlobalAnalysisMode analysisMode, CeTaskReportDataHolder ceTaskReportDataHolder, ScanProperties properties) { this.wsClient = wsClient; this.properties = properties; - this.reportMetadataHolder = reportMetadataHolder; + this.ceTaskReportDataHolder = ceTaskReportDataHolder; this.analysisMode = analysisMode; } @@ -83,7 +83,7 @@ public class QualityGateCheck implements Startable { throw new IllegalStateException("Quality Gate check not available in medium test mode"); } - String taskId = reportMetadataHolder.getCeTaskId(); + String taskId = ceTaskReportDataHolder.getCeTaskId(); Ce.Task task = waitForCeTaskToFinish(taskId); @@ -96,6 +96,8 @@ public class QualityGateCheck implements Startable { if (Status.OK.equals(qualityGateStatus)) { LOG.info("Quality Gate - OK"); } else { + LOG.info("Quality Gate - FAILED, you can browse {}", ceTaskReportDataHolder.getDashboardUrl()); + LOG.info("More about the report processing at {}", ceTaskReportDataHolder.getCeTaskUrl()); throw MessageException.of("Quality Gate - FAILED"); } } |