Class DockerBuildImageTask
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<DockerBuildImageTask,DockerBuildImageTaskProperties>
com.atlassian.bamboo.specs.builders.task.DockerBuildImageTask
public class DockerBuildImageTask
extends AbstractDockerTask<DockerBuildImageTask,DockerBuildImageTaskProperties>
Task to build docker image.
-
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionadditionalArguments
(String additionalArguments) Specifies additional build options, see https://docs.docker.com/engine/reference/commandline/build/.protected @NotNull DockerBuildImageTaskProperties
build()
dockerfile
(String dockerfile) Specifies content of a Dockerfile.dockerfileFromPath
(@NotNull Path path) Specifies content of a Dockerfile with content of a file.Task will use Dockerfile which should be available in a working directory.boolean
int
hashCode()
imageFilename
(String imageFilename) Specifies name of the file to which image will be saved.Sets the image name.saveAsFile
(boolean saveAsFile) If set to true Docker image will be saved to file.useCache
(boolean useCache) Specifies if cache should be used.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
conditions, description, enabled, requirements, toString
-
Constructor Details
-
DockerBuildImageTask
public DockerBuildImageTask()
-
-
Method Details
-
imageName
Sets the image name. You can also optionally specify repository, namespace and a tag. E.g. registry.address:port/namespace/repository:tagThis field is mandatory.
-
dockerfileInWorkingDir
Task will use Dockerfile which should be available in a working directory. -
dockerfile
Specifies content of a Dockerfile.Specifying content of a Dockerfile is mandatory, unless you use
dockerfileInWorkingDir()
-
dockerfileFromPath
Specifies content of a Dockerfile with content of a file. File must be available on the path when running Bamboo Specs.Specifying content of a Dockerfile is mandatory, unless you use
dockerfileInWorkingDir()
-
useCache
Specifies if cache should be used. Defaults to true. -
saveAsFile
If set to true Docker image will be saved to file.If sets to true
imageFilename
must be specified. -
imageFilename
Specifies name of the file to which image will be saved. -
additionalArguments
Specifies additional build options, see https://docs.docker.com/engine/reference/commandline/build/. -
build
- Specified by:
build
in classTask<DockerBuildImageTask,
DockerBuildImageTaskProperties>
-
equals
- Overrides:
equals
in classAbstractDockerTask<DockerBuildImageTask,
DockerBuildImageTaskProperties>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractDockerTask<DockerBuildImageTask,
DockerBuildImageTaskProperties>
-