Class DockerPipelineConfigurationImpl
- java.lang.Object
-
- com.atlassian.bamboo.build.docker.DockerPipelineConfigurationImpl
-
- All Implemented Interfaces:
DockerPipelineConfiguration
,ConvertibleFromConfig
,OptionallyConvertibleFromConfig
public class DockerPipelineConfigurationImpl extends Object implements DockerPipelineConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DockerPipelineConfigurationImpl.ConfigFields
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_FIELD_PREFIX
static String
PROGRAM_ARGUMENT
-
Constructor Summary
Constructors Constructor Description DockerPipelineConfigurationImpl()
DockerPipelineConfigurationImpl(@NotNull DockerPipelineConfiguration dockerPipelineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
@NotNull List<String>
getAdditionalArgs()
Additional arguments for docker command.@NotNull List<DataVolume>
getDataVolumes()
List of data volume mapping between host and container.@Nullable String
getImage()
Docker image to be used for the Docker pipeline.int
hashCode()
boolean
isEnabled()
Whether the Docker pipeline is enabled.boolean
isValid()
Is the object state valid after it has been initialised from properties.void
populateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in theHierarchicalConfiguration
void
setAdditionalArgs(@NotNull Iterable<String> additionalArgs)
void
setDataVolumes(@NotNull Iterable<DataVolume> dataVolumes)
void
setEnabled(boolean enabled)
void
setImage(String image)
@NotNull org.apache.commons.configuration.HierarchicalConfiguration
toConfiguration()
Generate aHierarchicalConfiguration
from the current state of the objectString
toString()
-
-
-
Field Detail
-
CONFIG_FIELD_PREFIX
public static final String CONFIG_FIELD_PREFIX
-
PROGRAM_ARGUMENT
public static final String PROGRAM_ARGUMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DockerPipelineConfigurationImpl
public DockerPipelineConfigurationImpl()
-
DockerPipelineConfigurationImpl
public DockerPipelineConfigurationImpl(@NotNull @NotNull DockerPipelineConfiguration dockerPipelineConfiguration)
-
-
Method Detail
-
populateFromConfig
public void populateFromConfig(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface:ConvertibleFromConfig
Update the current object with data in theHierarchicalConfiguration
- Specified by:
populateFromConfig
in interfaceConvertibleFromConfig
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Description copied from interface:ConvertibleFromConfig
Generate aHierarchicalConfiguration
from the current state of the object- Specified by:
toConfiguration
in interfaceConvertibleFromConfig
- Returns:
- Always returns an
HierarchicalConfiguration
. Never null
-
isValid
public boolean isValid()
Description copied from interface:OptionallyConvertibleFromConfig
Is the object state valid after it has been initialised from properties.- Specified by:
isValid
in interfaceOptionallyConvertibleFromConfig
- Returns:
-
isEnabled
public boolean isEnabled()
Description copied from interface:DockerPipelineConfiguration
Whether the Docker pipeline is enabled.- Specified by:
isEnabled
in interfaceDockerPipelineConfiguration
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceDockerPipelineConfiguration
-
getImage
@Nullable public @Nullable String getImage()
Description copied from interface:DockerPipelineConfiguration
Docker image to be used for the Docker pipeline. The value can be any valid image identifier accepted by Docker, in particular it can consist of registry information, namespace, image name and tag name.Example:
localhost:5000/atlassian/docker-image:version-5
- Specified by:
getImage
in interfaceDockerPipelineConfiguration
-
setImage
public void setImage(String image)
- Specified by:
setImage
in interfaceDockerPipelineConfiguration
-
getDataVolumes
@NotNull public @NotNull List<DataVolume> getDataVolumes()
Description copied from interface:DockerPipelineConfiguration
List of data volume mapping between host and container.- Specified by:
getDataVolumes
in interfaceDockerPipelineConfiguration
-
setDataVolumes
public void setDataVolumes(@NotNull @NotNull Iterable<DataVolume> dataVolumes)
- Specified by:
setDataVolumes
in interfaceDockerPipelineConfiguration
-
getAdditionalArgs
@NotNull public @NotNull List<String> getAdditionalArgs()
Description copied from interface:DockerPipelineConfiguration
Additional arguments for docker command.- Specified by:
getAdditionalArgs
in interfaceDockerPipelineConfiguration
-
setAdditionalArgs
@NotNull public void setAdditionalArgs(@NotNull @NotNull Iterable<String> additionalArgs)
- Specified by:
setAdditionalArgs
in interfaceDockerPipelineConfiguration
-
-