use of com.epam.pipeline.manager.python.GraphReader in project cloud-pipeline by epam.
the class PipelineVersionManager method getWorkflowGraph.
public TaskGraphVO getWorkflowGraph(Long id, String version) {
Pipeline pipeline = pipelineManager.load(id);
try {
gitManager.loadRevision(pipeline, version);
} catch (GitClientException e) {
LOGGER.error(e.getMessage(), e);
throw new IllegalArgumentException(e.getMessage());
}
File config = gitManager.getConfigFile(pipeline, version);
TaskGraphVO result = new GraphReader().readGraph(graphScript, config.getParentFile().getAbsolutePath(), CONFIG_FILE_NAME);
mergeToolsRequirements(result);
try {
FileUtils.deleteDirectory(config.getParentFile());
} catch (IOException e) {
LOGGER.error(e.getMessage(), e);
}
return result;
}
Aggregations