public class ClientBuilderForConnector extends Object
Modifier and Type | Method and Description |
---|---|
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.DockerClient |
build() |
ClientBuilderForConnector |
forConnector(DockerConnector connector)
Provides ready to use docker client with information from docker connector
|
ClientBuilderForConnector |
forServer(String uri,
String version)
Method to setup url and docker-api version.
|
static com.cloudbees.plugins.credentials.Credentials |
lookupSystemCredentials(String credentialsId)
Util method to find credential by id in jenkins
|
static ClientBuilderForConnector |
newClientBuilderForConnector()
helper class
|
ClientBuilderForConnector |
withConfigBuilder(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.DefaultDockerClientConfig.Builder configBuilder) |
ClientBuilderForConnector |
withConnectorType(ConnectorType connectorType) |
ClientBuilderForConnector |
withConnectTimeout(Integer connectTimeout) |
ClientBuilderForConnector |
withCredentials(com.cloudbees.plugins.credentials.Credentials credentials) |
ClientBuilderForConnector |
withCredentialsId(String credentialsId)
Sets SSLConfig from defined credentials id.
|
ClientBuilderForConnector |
withDockerClientConfig(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.DockerClientConfig clientConfig) |
ClientBuilderForConnector |
withDockerCmdExecFactory(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.AbstractDockerCmdExecFactory dockerCmdExecFactory) |
ClientBuilderForConnector |
withDockerConnector(DockerConnector connector) |
ClientBuilderForConnector |
withReadTimeout(Integer readTimeout) |
ClientBuilderForConnector |
withSslConfig(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.SSLConfig sslConfig) |
public ClientBuilderForConnector withDockerCmdExecFactory(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.AbstractDockerCmdExecFactory dockerCmdExecFactory)
public ClientBuilderForConnector withSslConfig(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.SSLConfig sslConfig) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
public ClientBuilderForConnector forConnector(DockerConnector connector) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
connector
- docker connector with info about url, version, creds and timeoutUnrecoverableKeyException
NoSuchAlgorithmException
KeyStoreException
KeyManagementException
public ClientBuilderForConnector withConnectorType(ConnectorType connectorType)
public ClientBuilderForConnector withConnectTimeout(Integer connectTimeout)
public ClientBuilderForConnector withReadTimeout(Integer readTimeout)
public ClientBuilderForConnector forServer(String uri, @Nullable String version)
uri
- docker server uriversion
- docker-api versionpublic ClientBuilderForConnector withCredentialsId(String credentialsId) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
credentialsId
- credentials to find in jenkinsUnrecoverableKeyException
NoSuchAlgorithmException
KeyStoreException
KeyManagementException
public ClientBuilderForConnector withCredentials(com.cloudbees.plugins.credentials.Credentials credentials) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
public ClientBuilderForConnector withConfigBuilder(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.DefaultDockerClientConfig.Builder configBuilder)
public ClientBuilderForConnector withDockerClientConfig(com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.DockerClientConfig clientConfig)
public ClientBuilderForConnector withDockerConnector(DockerConnector connector) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
public com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.DockerClient build()
public static com.cloudbees.plugins.credentials.Credentials lookupSystemCredentials(String credentialsId)
credentialsId
- credentials to find in jenkinsCertificateCredentials
or StandardUsernamePasswordCredentials
expectedpublic static ClientBuilderForConnector newClientBuilderForConnector()
Copyright © 2016–2020. All rights reserved.