Class AbstractDockerRegistryTask<T extends AbstractDockerRegistryTask<T>>
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<P>
-
- com.atlassian.bamboo.specs.api.builders.task.Task<T,P>
-
- com.atlassian.bamboo.specs.builders.task.AbstractDockerTask<T,DockerRegistryTaskProperties>
-
- com.atlassian.bamboo.specs.builders.task.AbstractDockerRegistryTask<T>
-
- Direct Known Subclasses:
DockerPullImageTask,DockerPushImageTask
public abstract class AbstractDockerRegistryTask<T extends AbstractDockerRegistryTask<T>> extends AbstractDockerTask<T,DockerRegistryTaskProperties>
Class containing common parts to Docker tasks which operates on Docker registry, likeDockerPushImageTaskorDockerPullImageTask.
-
-
Field Summary
Fields Modifier and Type Field Description protected @Nullable java.lang.Stringemailprotected @NotNull java.lang.Stringimageprotected @Nullable java.lang.Stringpasswordprotected DockerRegistryTaskProperties.RegistryTyperegistryTypeprotected @Nullable SharedCredentialsIdentifierPropertiessharedCredentialsIdentifierprotected @Nullable java.lang.Stringusername-
Fields inherited from class com.atlassian.bamboo.specs.builders.task.AbstractDockerTask
environmentVariables, workingSubdirectory
-
Fields inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, requirements, taskEnabled
-
-
Constructor Summary
Constructors Constructor Description AbstractDockerRegistryTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tauthentication(@NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)Sets authentication settings to authenticate to Docker registry by Shared credentials.Tauthentication(@NotNull java.lang.String username, @NotNull java.lang.String password)Sets authentication settings to authenticate to Docker registry.Tauthentication(@NotNull java.lang.String username, @NotNull java.lang.String password, @NotNull java.lang.String email)Sets authentication settings to authenticate to Docker registry.TcustomRegistryImage(@NotNull java.lang.String image)TdefaultAuthentication()Use agent's ~/.dockercfg credentials to authenticate to Docker registry.TdockerHubImage(@NotNull java.lang.String image)booleanequals(java.lang.Object o)inthashCode()-
Methods inherited from class com.atlassian.bamboo.specs.builders.task.AbstractDockerTask
environmentVariables, workingSubdirectory
-
Methods inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
build, conditions, description, enabled, requirements, toString
-
-
-
-
Field Detail
-
image
@NotNull protected @NotNull java.lang.String image
-
registryType
@NotNull protected DockerRegistryTaskProperties.RegistryType registryType
-
username
@Nullable protected @Nullable java.lang.String username
-
password
@Nullable protected @Nullable java.lang.String password
-
email
@Nullable protected @Nullable java.lang.String email
-
sharedCredentialsIdentifier
@Nullable protected @Nullable SharedCredentialsIdentifierProperties sharedCredentialsIdentifier
-
-
Method Detail
-
dockerHubImage
public T dockerHubImage(@NotNull @NotNull java.lang.String image)
-
customRegistryImage
public T customRegistryImage(@NotNull @NotNull java.lang.String image)
-
authentication
public T authentication(@NotNull @NotNull java.lang.String username, @NotNull @NotNull java.lang.String password, @NotNull @NotNull java.lang.String email)
Sets authentication settings to authenticate to Docker registry. All fields are required. You can also use default authentication method bydefaultAuthentication()
-
authentication
public T authentication(@NotNull @NotNull java.lang.String username, @NotNull @NotNull java.lang.String password)
Sets authentication settings to authenticate to Docker registry. All fields are required. You can also use default authentication method bydefaultAuthentication()
-
authentication
public T authentication(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
Sets authentication settings to authenticate to Docker registry by Shared credentials.
-
defaultAuthentication
public T defaultAuthentication()
Use agent's ~/.dockercfg credentials to authenticate to Docker registry.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classAbstractDockerTask<T extends AbstractDockerRegistryTask<T>,DockerRegistryTaskProperties>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractDockerTask<T extends AbstractDockerRegistryTask<T>,DockerRegistryTaskProperties>
-
-