public class DockerRegistryEndpoint extends hudson.model.AbstractDescribableImpl<DockerRegistryEndpoint>
As Describable it comes with pre-baked configuration form that you can use in
your builders/publishers/etc that interact with Docker daemon.
| Modifier and Type | Class and Description |
|---|---|
static class |
DockerRegistryEndpoint.DescriptorImpl |
| Constructor and Description |
|---|
DockerRegistryEndpoint(String url,
String credentialsId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getCredentialsId()
ID of the credentials used to talk to this endpoint.
|
URL |
getEffectiveUrl()
Gets the endpoint URL, such as "https://index.docker.io/v1/"
|
DockerRegistryToken |
getToken(hudson.model.Item context)
Plugins that want to refer to a
IdCredentials should do so via ID string,
and use this method to resolve it and convert to DockerRegistryToken. |
String |
getUrl()
For stapler.
|
int |
hashCode() |
String |
imageName(String userAndRepo)
Decorates the repository ID like "jenkinsci/workflow-demo" with repository prefix.
|
KeyMaterialFactory |
newKeyMaterialFactory(hudson.model.AbstractBuild build)
Makes the credentials available locally for the on-going build
and returns
KeyMaterialFactory that gives you the parameters needed to access it. |
KeyMaterialFactory |
newKeyMaterialFactory(hudson.model.Item context,
hudson.remoting.VirtualChannel target)
Makes the credentials available locally and returns
KeyMaterialFactory that gives you the parameters
needed to access it. |
String |
toString() |
@Nonnull public URL getEffectiveUrl() throws IOException
IOException@Nullable public String getUrl()
@Nullable public String getCredentialsId()
@CheckForNull public DockerRegistryToken getToken(hudson.model.Item context)
IdCredentials should do so via ID string,
and use this method to resolve it and convert to DockerRegistryToken.context - If you are a build step trying to access DockerHub in the context of a build/job,
specify that job. Otherwise null. If you are scoped to something else, you might
have to interact with CredentialsProvider directly.public KeyMaterialFactory newKeyMaterialFactory(hudson.model.AbstractBuild build) throws IOException, InterruptedException
KeyMaterialFactory that gives you the parameters needed to access it.IOExceptionInterruptedExceptionpublic KeyMaterialFactory newKeyMaterialFactory(hudson.model.Item context, hudson.remoting.VirtualChannel target) throws IOException, InterruptedException
KeyMaterialFactory that gives you the parameters
needed to access it.IOExceptionInterruptedExceptionpublic String imageName(String userAndRepo) throws IOException
IOExceptionCopyright © 2004-2015. All Rights Reserved.