use of io.elastest.etm.model.VersionInfo in project elastest-torm by elastest.
the class EtmContextService method loadHelpInfoFromImages.
private void loadHelpInfoFromImages() {
List<String> imagesNames = Arrays.asList(etImages.split(","));
helpInfo = new HelpInfo();
imagesNames.forEach((imageName) -> {
try {
InspectImageResponse imageInfo = dockerService.getImageInfoByName(imageName);
VersionInfo imageVersionInfo = new VersionInfo(imageInfo.getConfig().getLabels().get("git_commit"), imageInfo.getConfig().getLabels().get("commit_date"), imageInfo.getConfig().getLabels().get("version"));
helpInfo.getVersionsInfo().put(imageName, imageVersionInfo);
} catch (Exception e) {
logger.error("Unable to retrieve ElasTest Help Information.");
}
});
}
use of io.elastest.etm.model.VersionInfo in project elastest-torm by elastest.
the class ExternalService method getElasTestVersion.
public String getElasTestVersion() {
String version = "undefined";
HelpInfo helpInfo = etmContextService.getHelpInfo();
for (Map.Entry<String, VersionInfo> entry : helpInfo.getVersionsInfo().entrySet()) {
if (entry.getKey().split(":")[0].equals("elastest/platform")) {
version = entry.getValue().getName();
logger.debug("ElasTest version {}", version);
break;
}
}
return version;
}
Aggregations