Class AbstractDockerRemoteApiTask

    • Constructor Detail

      • AbstractDockerRemoteApiTask

        public AbstractDockerRemoteApiTask()
    • Method Detail

      • onError

        public void onError​(Action<? super Throwable> action)
        Reacts to a potential error occurring during the operation.
        Parameters:
        action - The action handling the error
        Since:
        4.0.0
      • onNext

        public void onNext​(Action action)
        Reacts to data returned by an operation.
        Parameters:
        action - The action handling the data
        Since:
        4.0.0
      • onComplete

        public void onComplete​(Runnable callback)
        Reacts to the completion of the operation.
        Parameters:
        callback - The callback to be executed
        Since:
        4.0.0
      • getDockerClient

        @Internal
        public com.github.dockerjava.api.DockerClient getDockerClient()
        Gets the Docker client uses to communicate with Docker via its remote API. Initialized instance upon first request. Returns the same instance for any successive method call. To support the configuration cache we rely on DockerClientService's internal cache.

        Before accessing the Docker client, all data used for configuring its runtime behavior needs to be evaluated. The data includes:

        1. The property values of this class
        2. The plugin's extension property values

        It is safe to access the Docker client under the following conditions:

        1. In the task action
        2. In the task's constructor if used in Action or Closure of outputs.upToDateWhen
        Returns:
        The Docker client
      • getRegistryAuthLocator

        @Internal
        protected RegistryAuthLocator getRegistryAuthLocator()
        Returns the instance of RegistryAuthLocator.

        Unless other credentials information provided, the instance returns authConfig object provided by the Docker client.

        Returns:
        The registry authentication locator
      • runRemoteCommand

        public abstract void runRemoteCommand()
                                       throws Exception
        Throws:
        Exception