All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.gesellix.gradle.docker.tasks.DockerPingTask Maven / Gradle / Ivy

package de.gesellix.gradle.docker.tasks;

import de.gesellix.docker.client.EngineResponseContent;
import org.gradle.api.model.ObjectFactory;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.TaskAction;

import javax.inject.Inject;

public class DockerPingTask extends GenericDockerTask {

  private EngineResponseContent result;

  @Internal
  public EngineResponseContent getResult() {
    return result;
  }

  @Inject
  public DockerPingTask(ObjectFactory objectFactory) {
    super(objectFactory);
    setDescription("Ping the docker server");
  }

  @TaskAction
  public EngineResponseContent ping() {
    getLogger().info("docker ping");
    return result = getDockerClient().ping();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy