Search in sources :

Example 1 with PipelineDocumentTemplate

use of com.epam.pipeline.manager.pipeline.documents.templates.PipelineDocumentTemplate in project cloud-pipeline by epam.

the class PipelineFileGenerationManager method fillTemplateForPipelineVersion.

public byte[] fillTemplateForPipelineVersion(Long pipelineId, String pipelineVersion, String templatePath, GenerateFileVO generateFileVO) {
    try {
        PipelineDocumentTemplate documentTemplate = pipelineDocumentTemplateManager.loadPipelineDocumentTemplateWithSpecificVersion(pipelineId, pipelineVersion);
        documentTemplate.applyLuigiWorkflowGraph(generateFileVO.getLuigiWorkflowGraphVO());
        return this.generateFile(templatePath, documentTemplate);
    } catch (GitClientException e) {
        return null;
    }
}
Also used : GitClientException(com.epam.pipeline.exception.git.GitClientException) PipelineDocumentTemplate(com.epam.pipeline.manager.pipeline.documents.templates.PipelineDocumentTemplate)

Example 2 with PipelineDocumentTemplate

use of com.epam.pipeline.manager.pipeline.documents.templates.PipelineDocumentTemplate in project cloud-pipeline by epam.

the class PipelineFileGenerationManager method fillTemplateForPipelineCurrentVersion.

public byte[] fillTemplateForPipelineCurrentVersion(Long pipelineId, String templatePath, GenerateFileVO generateFileVO) {
    PipelineDocumentTemplate documentTemplate = pipelineDocumentTemplateManager.loadPipelineDocumentTemplateWithCurrentVersion(pipelineId);
    documentTemplate.applyLuigiWorkflowGraph(generateFileVO.getLuigiWorkflowGraphVO());
    return this.generateFile(templatePath, documentTemplate);
}
Also used : PipelineDocumentTemplate(com.epam.pipeline.manager.pipeline.documents.templates.PipelineDocumentTemplate)

Aggregations

PipelineDocumentTemplate (com.epam.pipeline.manager.pipeline.documents.templates.PipelineDocumentTemplate)2 GitClientException (com.epam.pipeline.exception.git.GitClientException)1