diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2019-11-04 16:08:44 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-11-08 20:21:13 +0100 |
commit | 45e5169e40b9049cb2c68e5da94ed8e7053525b8 (patch) | |
tree | ce332ef332f1fcf058019e6611230cfcdc035ec7 /sonar-scanner-engine/src | |
parent | 4fa06438df258d10839ca955fb8c9bbf74249e73 (diff) | |
download | sonarqube-45e5169e40b9049cb2c68e5da94ed8e7053525b8.tar.gz sonarqube-45e5169e40b9049cb2c68e5da94ed8e7053525b8.zip |
SONAR-12630 Add dashboard url to message exception in case QG fails
Diffstat (limited to 'sonar-scanner-engine/src')
3 files changed, 3 insertions, 7 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisResultReporter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisResultReporter.java index 20c32d0b7c6..a4831961aa3 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisResultReporter.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisResultReporter.java @@ -47,8 +47,8 @@ public class AnalysisResultReporter { LOG.info("ANALYSIS SUCCESSFUL, you can browse {}", ceTaskReportDataHolder.getDashboardUrl()); if (!scanProperties.shouldWaitForQualityGate()) { LOG.info("Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report"); + LOG.info("More about the report processing at {}", ceTaskReportDataHolder.getCeTaskUrl()); } - LOG.info("More about the report processing at {}", ceTaskReportDataHolder.getCeTaskUrl()); } } } 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 52e330d1bf8..52c52bd2cb1 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 @@ -96,9 +96,7 @@ 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"); + throw MessageException.of("Quality Gate - FAILED, you can browse " + ceTaskReportDataHolder.getDashboardUrl()); } } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisResultReporterTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisResultReporterTest.java index f5c9d89b60e..97aa3208906 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisResultReporterTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisResultReporterTest.java @@ -78,8 +78,6 @@ public class AnalysisResultReporterTest { underTest.report(); assertThat(logTester.logs(LoggerLevel.INFO)) - .containsExactly( - "ANALYSIS SUCCESSFUL, you can browse " + dashboardUrl, - "More about the report processing at " + ceTaskUrl); + .containsExactly("ANALYSIS SUCCESSFUL, you can browse " + dashboardUrl); } } |