use of org.eclipse.jkube.kit.build.service.docker.wait.HttpPingChecker in project jkube by eclipse.
the class WaitService method getUrlWaitChecker.
// =================================================================================================================
private WaitChecker getUrlWaitChecker(String imageConfigDesc, Properties projectProperties, WaitConfiguration wait) {
String waitUrl = StringSubstitutor.replace(wait.getUrl(), projectProperties);
WaitConfiguration.HttpConfiguration httpConfig = wait.getHttp();
HttpPingChecker checker;
if (httpConfig != null) {
checker = new HttpPingChecker(waitUrl, httpConfig.getMethod(), httpConfig.getStatus(), httpConfig.isAllowAllHosts());
log.info("%s: Waiting on url %s with method %s for status %s.", imageConfigDesc, waitUrl, httpConfig.getMethod(), httpConfig.getStatus());
} else {
checker = new HttpPingChecker(waitUrl);
log.info("%s: Waiting on url %s.", imageConfigDesc, waitUrl);
}
return checker;
}
Aggregations