Search in sources :

Example 1 with TaskContainer

use of org.sonar.ce.task.container.TaskContainer in project sonarqube by SonarSource.

the class ProjectExportTaskProcessor method processProjectExport.

private void processProjectExport(CeTask task) {
    CeTask.Component exportComponent = mandatoryComponent(task, PROJECT_EXPORT);
    failIfNotMain(exportComponent, task);
    ProjectDescriptor projectExportDescriptor = new ProjectDescriptor(exportComponent.getUuid(), mandatoryKey(exportComponent), mandatoryName(exportComponent));
    try (TaskContainer taskContainer = new TaskContainerImpl(componentContainer, new ProjectExportContainerPopulator(projectExportDescriptor))) {
        taskContainer.bootup();
        taskContainer.getComponentByType(ProjectExportProcessor.class).process();
    }
}
Also used : TaskContainerImpl(org.sonar.ce.task.container.TaskContainerImpl) TaskContainer(org.sonar.ce.task.container.TaskContainer) ProjectExportContainerPopulator(org.sonar.ce.task.projectexport.ProjectExportContainerPopulator) CeTask(org.sonar.ce.task.CeTask) ProjectExportProcessor(org.sonar.ce.task.projectexport.ProjectExportProcessor)

Example 2 with TaskContainer

use of org.sonar.ce.task.container.TaskContainer in project sonarqube by SonarSource.

the class IssueSyncTaskProcessor method process.

@CheckForNull
@Override
public CeTaskResult process(CeTask task) {
    try (TaskContainer container = new TaskContainerImpl(ceEngineContainer, newContainerPopulator(task))) {
        container.bootup();
        container.getComponentByType(ComputationStepExecutor.class).execute();
    }
    return null;
}
Also used : TaskContainerImpl(org.sonar.ce.task.container.TaskContainerImpl) TaskContainer(org.sonar.ce.task.container.TaskContainer) ComputationStepExecutor(org.sonar.ce.task.step.ComputationStepExecutor) CheckForNull(javax.annotation.CheckForNull)

Example 3 with TaskContainer

use of org.sonar.ce.task.container.TaskContainer in project sonarqube by SonarSource.

the class AuditPurgeTaskProcessor method process.

@CheckForNull
@Override
public CeTaskResult process(CeTask task) {
    try (TaskContainer container = new TaskContainerImpl(ceEngineContainer, newContainerPopulator(task))) {
        container.bootup();
        container.getComponentByType(ComputationStepExecutor.class).execute();
    }
    return null;
}
Also used : TaskContainerImpl(org.sonar.ce.task.container.TaskContainerImpl) TaskContainer(org.sonar.ce.task.container.TaskContainer) ComputationStepExecutor(org.sonar.ce.task.step.ComputationStepExecutor) CheckForNull(javax.annotation.CheckForNull)

Example 4 with TaskContainer

use of org.sonar.ce.task.container.TaskContainer in project sonarqube by SonarSource.

the class ReportTaskProcessor method process.

@Override
public CeTaskResult process(CeTask task) {
    try (TaskContainer ceContainer = containerFactory.create(serverContainer, task, componentProviders)) {
        ceContainer.bootup();
        ceContainer.getComponentByType(ComputationStepExecutor.class).execute();
        return ceContainer.getComponentByType(TaskResultHolder.class).getResult();
    }
}
Also used : TaskContainer(org.sonar.ce.task.container.TaskContainer) TaskResultHolder(org.sonar.ce.task.taskprocessor.TaskResultHolder) ComputationStepExecutor(org.sonar.ce.task.step.ComputationStepExecutor)

Aggregations

TaskContainer (org.sonar.ce.task.container.TaskContainer)4 TaskContainerImpl (org.sonar.ce.task.container.TaskContainerImpl)3 ComputationStepExecutor (org.sonar.ce.task.step.ComputationStepExecutor)3 CheckForNull (javax.annotation.CheckForNull)2 CeTask (org.sonar.ce.task.CeTask)1 ProjectExportContainerPopulator (org.sonar.ce.task.projectexport.ProjectExportContainerPopulator)1 ProjectExportProcessor (org.sonar.ce.task.projectexport.ProjectExportProcessor)1 TaskResultHolder (org.sonar.ce.task.taskprocessor.TaskResultHolder)1