Class DockerRegistryToken
- java.lang.Object
-
- org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken
-
- All Implemented Interfaces:
Serializable
public final class DockerRegistryToken extends Object implements Serializable
Represents an authentication token that docker(1) understands when pushing/pulling from a docker registry. Obtained from variousCredentials
implementations viaAuthenticationTokens
.- Author:
- Kohsuke Kawaguchi
- See Also:
AuthenticationTokens
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DockerRegistryToken(String email, String token)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getEmail()
String
getToken()
KeyMaterialFactory
newKeyMaterialFactory(URL endpoint, FilePath workspace, Launcher launcher, EnvVars env, TaskListener listener, String dockerExecutable)
Sets up an environment logged in to the specified Docker registry.KeyMaterialFactory
newKeyMaterialFactory(URL endpoint, FilePath workspace, Launcher launcher, TaskListener listener, String dockerExecutable)
KeyMaterialFactory
newKeyMaterialFactory(URL endpoint, hudson.remoting.VirtualChannel target)
KeyMaterialFactory
newKeyMaterialFactory(URL endpoint, hudson.remoting.VirtualChannel target, Launcher launcher, TaskListener listener)
-
-
-
Method Detail
-
getEmail
public String getEmail()
-
getToken
public String getToken()
-
newKeyMaterialFactory
@Deprecated public KeyMaterialFactory newKeyMaterialFactory(URL endpoint, @NonNull hudson.remoting.VirtualChannel target) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
newKeyMaterialFactory
@Deprecated public KeyMaterialFactory newKeyMaterialFactory(@NonNull URL endpoint, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull TaskListener listener, @NonNull String dockerExecutable) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
newKeyMaterialFactory
public KeyMaterialFactory newKeyMaterialFactory(@NonNull URL endpoint, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull EnvVars env, @NonNull TaskListener listener, @NonNull String dockerExecutable) throws InterruptedException, IOException
Sets up an environment logged in to the specified Docker registry.- Parameters:
dockerExecutable
- as inDockerTool.getExecutable(java.lang.String, hudson.model.Node, hudson.model.TaskListener, hudson.EnvVars)
, with a 1.8+ client- Throws:
InterruptedException
IOException
-
newKeyMaterialFactory
@Deprecated public KeyMaterialFactory newKeyMaterialFactory(@NonNull URL endpoint, @NonNull hudson.remoting.VirtualChannel target, @CheckForNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException
Makes the credentials available locally and returnsKeyMaterialFactory
that gives you the parameters needed to access it. This is done by inserting the token into~/.dockercfg
- Throws:
InterruptedException
IOException
-
-