Search in sources :

Example 1 with HttpPingChecker

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;
}
Also used : HttpPingChecker(org.eclipse.jkube.kit.build.service.docker.wait.HttpPingChecker) WaitConfiguration(org.eclipse.jkube.kit.config.image.WaitConfiguration)

Aggregations

HttpPingChecker (org.eclipse.jkube.kit.build.service.docker.wait.HttpPingChecker)1 WaitConfiguration (org.eclipse.jkube.kit.config.image.WaitConfiguration)1