public abstract class KeyMaterial extends Object implements Closeable, Serializable
Whenever you want to fork off docker directly or indirectly, use this object to set up environment variables so that docker will talk to the right daemon.
When you are done using the credentials, call close() to allow sensitive information to be removed
from the disk.
DockerServerEndpoint.materialize(AbstractBuild),
DockerRegistryEndpoint.materialize(AbstractBuild),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static KeyMaterial |
NULL
KeyMaterial that does nothing. |
| Constructor and Description |
|---|
KeyMaterial() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Deletes the key materials from the file system.
|
abstract hudson.EnvVars |
env()
Builds the environment variables needed to be passed when docker runs, to access
DockerServerCredentials that this object was created from. |
KeyMaterial |
plus(KeyMaterial rhs)
Merge two
KeyMaterials into one. |
public static final KeyMaterial NULL
KeyMaterial that does nothing.public abstract hudson.EnvVars env()
DockerServerCredentials that this object was created from.public abstract void close()
throws IOException
KeyMaterial is created, it must be also cleaned up each time.close in interface Closeableclose in interface AutoCloseableIOExceptionpublic KeyMaterial plus(@Nullable KeyMaterial rhs)
KeyMaterials into one.Copyright © 2004-2015. All Rights Reserved.