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) |
static DockerRegistryEndpoint |
fromImageName(String s,
String credentialsId)
Parse the registry endpoint out of a registry:port/namespace/name:tag string as created by
imageName(String). |
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 namespace/name (ie.
|
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() |
public static DockerRegistryEndpoint fromImageName(String s, @CheckForNull String credentialsId)
imageName(String). Credentials are set to the id passed. The url is built from registry:port into
https://registry:port, the same way docker push does.s - credentialsId - passed to the constructor, can be nullIllegalArgumentException - if string can't be parsed@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
userAndRepo - the namespace/name part to append to the registryIOExceptionCopyright © 2004-2015. All Rights Reserved.