class ExecutionService {

    public void uploadExecutionReport(long projectId, String projectCode, String branch, String cycle, MultipartFile zipFile) throws IOException {
        CycleDefinition cycleDefinition = cycleDefinitionRepository.findByProjectIdAndBranchAndName(projectId, branch, cycle)
                .orElseThrow(() -> new IllegalArgumentException("The branch or cycle for this project doesn't exists."));

        String path = settingService.get(projectId, Settings.EXECUTION_INDEXER_FILE_EXECUTION_BASE_PATH)
                .replace(Settings.PROJECT_VARIABLE, projectCode)
                .replace(Settings.BRANCH_VARIABLE, branch)
                .replace(Settings.CYCLE_VARIABLE, cycle);
        File destinationDirectory = new File(path, "incoming");
        String buildInformationFilePath = settingService.get(projectId, Settings.EXECUTION_INDEXER_FILE_BUILD_INFORMATION_PATH);
        List<File> executionDirectories = this.unzipExecutions(destinationDirectory, zipFile, buildInformationFilePath);
        for (final File executionDirectory : executionDirectories) {
            try {
                processSpecificDirectory(cycleDefinition, executionDirectory);
            } catch (Exception e) {
                log.error("A problem occurred while indexing this execution [{}]", executionDirectory.getPath(), e);
            } finally {
                log.info("Cleaning the incoming folder: {}", executionDirectory.getAbsolutePath());
                cleanExecutionFiles(projectId, executionDirectory);
            }
        }
    }

}