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 |
|---|---|
String |
getCredentialsId()
ID of the credentials used to talk to this endpoint.
|
URL |
getEffectiveUrl()
Gets the endpoint URL, such as "http://index.docker.io/v1/"
|
DockerRegistryToken |
getToken(hudson.model.Item context)
Plugins that want to refer to a
DockerRegistryCredentials should do so via ID string,
and use this method to resolve it to DockerRegistryCredentials. |
String |
getUrl()
For stapler.
|
String |
imageName(String userAndRepo)
Decorates the repository ID like "jenkinsci/workflow-demo" with repository prefix.
|
KeyMaterial |
materialize(hudson.model.AbstractBuild build)
Makes the credentials available locally for the on-going build
and returns
KeyMaterial that gives you the parameters needed to access it. |
KeyMaterial |
materialize(hudson.model.Item context,
hudson.remoting.VirtualChannel target)
Makes the credentials available locally and returns
KeyMaterial 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)
DockerRegistryCredentials should do so via ID string,
and use this method to resolve it to DockerRegistryCredentials.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 KeyMaterial materialize(hudson.model.AbstractBuild build) throws IOException, InterruptedException
KeyMaterial that gives you the parameters needed to access it.IOExceptionInterruptedExceptionpublic KeyMaterial materialize(hudson.model.Item context, hudson.remoting.VirtualChannel target) throws IOException, InterruptedException
KeyMaterial that gives you the parameters
needed to access it.IOExceptionInterruptedExceptionpublic String imageName(String userAndRepo) throws IOException
IOExceptionCopyright © 2004-2015. All Rights Reserved.