use of com.epam.pipeline.exception.ConfigDecodingException in project cloud-pipeline by epam.
the class PipelineVersionManager method createConfigVO.
private PipelineSourceItemVO createConfigVO(List<ConfigurationEntry> currentConfigurations, String updatedConfig, String message) {
String configContent;
try {
configContent = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(currentConfigurations);
} catch (JsonProcessingException e) {
throw new ConfigDecodingException(updatedConfig, e);
}
PipelineSourceItemVO source = new PipelineSourceItemVO();
source.setPath(CONFIG_FILE_NAME);
source.setContents(configContent);
source.setComment(message);
return source;
}
Aggregations