]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6398 Restore PostJob execution in preview mode
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 25 May 2015 14:18:05 +0000 (16:18 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Mon, 25 May 2015 14:18:05 +0000 (16:18 +0200)
sonar-batch/src/main/java/org/sonar/batch/phases/DatabaseLessPhaseExecutor.java

index f53ce1b715e4bb4d3576cee169c713642f49958b..c441713780aa6869f03e8b4ef425d5118372b74d 100644 (file)
@@ -38,6 +38,7 @@ public final class DatabaseLessPhaseExecutor implements PhaseExecutor {
   private final Phases phases;
   private final InitializersExecutor initializersExecutor;
   private final SensorsExecutor sensorsExecutor;
+  private final PostJobsExecutor postJobsExecutor;
   private final SensorContext sensorContext;
   private final DefaultIndex index;
   private final ProjectInitializer pi;
@@ -49,12 +50,13 @@ public final class DatabaseLessPhaseExecutor implements PhaseExecutor {
   private final LocalIssueTracking localIssueTracking;
   private final PublishReportJob publishReportJob;
 
-  public DatabaseLessPhaseExecutor(Phases phases, InitializersExecutor initializersExecutor, SensorsExecutor sensorsExecutor,
+  public DatabaseLessPhaseExecutor(Phases phases, InitializersExecutor initializersExecutor, PostJobsExecutor postJobsExecutor, SensorsExecutor sensorsExecutor,
     SensorContext sensorContext, DefaultIndex index,
     EventBus eventBus, ProjectInitializer pi, FileSystemLogger fsLogger, IssuesReports jsonReport, DefaultModuleFileSystem fs, QProfileVerifier profileVerifier,
     IssueExclusionsLoader issueExclusionsLoader, LocalIssueTracking localIssueTracking, PublishReportJob publishReportJob) {
     this.phases = phases;
     this.initializersExecutor = initializersExecutor;
+    this.postJobsExecutor = postJobsExecutor;
     this.sensorsExecutor = sensorsExecutor;
     this.sensorContext = sensorContext;
     this.index = index;
@@ -97,6 +99,9 @@ public final class DatabaseLessPhaseExecutor implements PhaseExecutor {
       localIssueTracking();
       issuesReport();
       publishReportJob();
+      if (phases.isEnabled(Phases.Phase.POSTJOB)) {
+        postJobsExecutor.execute(sensorContext);
+      }
     }
 
     cleanMemory();