use of org.eclipse.jkube.kit.build.service.docker.helper.ImageNameFormatter in project jkube by eclipse.
the class DockerImageWatcher method buildImage.
protected void buildImage(ImageConfiguration imageConfig) {
String imageName = imageConfig.getName();
// lets regenerate the label
try {
String imagePrefix = getImagePrefix(imageName);
imageName = imagePrefix + "%t";
ImageNameFormatter formatter = new ImageNameFormatter(getContext().getBuildContext().getProject(), new Date());
imageName = formatter.format(imageName);
imageConfig.setName(imageName);
log.info("New image name: " + imageConfig.getName());
} catch (Exception e) {
log.error("Caught: " + e, e);
}
}
Aggregations