use of org.sonar.api.ce.posttask.Project in project sonarqube by SonarSource.
the class PostProjectAnalysisTaskImpl method finished.
@Override
public void finished(ProjectAnalysis analysis) {
CeTask ceTask = analysis.getCeTask();
Project project = analysis.getProject();
QualityGate qualityGate = analysis.getQualityGate();
LOG.info("POSTASKPLUGIN: finished() CeTask[{}][{}] Project[{}] Date[{}] QualityGate[{}]", ceTask.getStatus(), ceTask.getId(), project.getKey(), analysis.getDate().getTime(), qualityGate == null ? null : qualityGate.getStatus());
}
use of org.sonar.api.ce.posttask.Project in project sonarqube by SonarSource.
the class PostProjectAnalysisTasksExecutorTest method project_uuid_key_and_name_come_from_CeTask.
@Test
public void project_uuid_key_and_name_come_from_CeTask() {
underTest.finished(true);
verify(postProjectAnalysisTask).finished(projectAnalysisArgumentCaptor.capture());
Project project = projectAnalysisArgumentCaptor.getValue().getProject();
assertThat(project.getUuid()).isEqualTo(ceTask.getComponentUuid());
assertThat(project.getKey()).isEqualTo(ceTask.getComponentKey());
assertThat(project.getName()).isEqualTo(ceTask.getComponentName());
}
Aggregations