Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 5944b98

Browse files
committed
Added sonar scan date and sonar scan version to console logs. Compiled all recent changes.
1 parent f8d7b7c commit 5944b98

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

64 Bytes
Binary file not shown.

sonar-qualitygates-plugin/src/com/tw/go/task/sonarqualitygate/SonarTaskExecutor.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public Result execute() throws Exception {
6161
log("Scan result is older than the start of the pipeline. Waiting for a newer scan ...");
6262

6363
result = sonarClient.getProjectWithQualityGateDetails(sonarProjectKey);
64+
6465
timeout = timeout + timeoutTime;
6566

6667
resultDate = result.getString("date");
@@ -70,6 +71,9 @@ public Result execute() throws Exception {
7071

7172
log("No new scan has been found !");
7273

74+
log("Date of Sonar scan: " + result.getString("date"));
75+
log("Version of Sonar scan: " + result.getString("version"));
76+
7377
return new Result(false, "Failed to get a newer quality gate for " + sonarProjectKey
7478
+ ". The present quality gate is older than the start of the Sonar scan task.");
7579
}
@@ -78,6 +82,9 @@ public Result execute() throws Exception {
7882

7983
}
8084

85+
log("Date of Sonar scan: " + result.getString("date"));
86+
log("Version of Sonar scan: " + result.getString("version"));
87+
8188
SonarParser parser = new SonarParser(result);
8289

8390
// check that a quality gate is returned
@@ -91,6 +98,9 @@ public Result execute() throws Exception {
9198
}
9299
else {
93100

101+
log("Date of Sonar scan: " + result.getString("date"));
102+
log("Version of Sonar scan: " + result.getString("version"));
103+
94104
SonarParser parser = new SonarParser(result);
95105

96106
// check that a quality gate is returned

0 commit comments

Comments
 (0)