Class BootBuildImage
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.springframework.boot.gradle.tasks.bundling.BootBuildImage
- All Implemented Interfaces:
Comparable<Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.TaskInternal
,Named
,ExtensionAware
,Task
,Configurable<Task>
- Since:
- 2.3.0
- Author:
- Andy Wilkinson, Scott Frederick, Rafael Ceccone, Jeroen Meijer, Julian Liebig
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.Namer
-
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildCache
(Action<CacheSpec> action) Customizes theCacheSpec
for the build cache using the givenaction
.void
buildWorkspace
(Action<CacheSpec> action) Customizes theCacheSpec
for the build temporary workspace using the givenaction
.void
docker
(Action<DockerSpec> action) Configures the Docker connection using the givenaction
.Returns the directory that contains application content in the image.abstract RegularFileProperty
Returns the property for the archive file from which the image will be built.abstract ListProperty
<String> Returns the volume bindings that will be mounted to the container when building the image.Returns the build cache that will be used when building the image.Returns the builder that will be used to build the image.abstract ListProperty
<String> Returns the buildpacks that will be used when building the image.Returns the build temporary workspace that will be used when building the image.Returns whether caches should be cleaned before packaging.Returns the date that will be used as theCreated
date of the image.Returns the Docker configuration the builder will use.abstract MapProperty
<String, String> Returns the environment that will be used when building the image.Returns the name of the image that will be built.Returns the platform (os/architecture/variant) that will be used for all pulled images.Returns the launch cache that will be used when building the image.Returns the network the build container will connect to.Whether the built image should be pushed to a registry.Property
<org.springframework.boot.buildpack.platform.build.PullPolicy> Returns image pull policy that will be used when building the image.Returns the run image that will be included in the built image.abstract ListProperty
<String> Returns the security options that will be applied to the builder container.abstract ListProperty
<String> getTags()
Returns the tags that will be created for the built image.Whether to treat the builder as trusted.Whether verbose logging should be enabled while building the image.void
launchCache
(Action<CacheSpec> action) Customizes theCacheSpec
for the launch cache using the givenaction
.void
setPullPolicy
(String pullPolicy) Sets image pull policy that will be used when building the image.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
Methods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
BootBuildImage
public BootBuildImage()
-
-
Method Details
-
getArchiveFile
Returns the property for the archive file from which the image will be built.- Returns:
- the archive file property
-
getImageName
-
getBuilder
-
getTrustBuilder
-
getRunImage
-
getEnvironment
Returns the environment that will be used when building the image.- Returns:
- the environment
-
getCleanCache
-
getVerboseLogging
-
getPullPolicy
-
setPullPolicy
Sets image pull policy that will be used when building the image.- Parameters:
pullPolicy
- the pull policy to use
-
getPublish
-
getBuildpacks
Returns the buildpacks that will be used when building the image.- Returns:
- the buildpack references
-
getBindings
Returns the volume bindings that will be mounted to the container when building the image.- Returns:
- the bindings
-
getTags
Returns the tags that will be created for the built image.- Returns:
- the tags
-
getNetwork
-
getBuildWorkspace
-
buildWorkspace
-
getBuildCache
-
buildCache
-
getLaunchCache
-
launchCache
-
getCreatedDate
-
getApplicationDirectory
-
getSecurityOptions
Returns the security options that will be applied to the builder container.- Returns:
- the security options
-
getImagePlatform
-
getDocker
Returns the Docker configuration the builder will use.- Returns:
- docker configuration.
- Since:
- 2.4.0
-
docker
Configures the Docker connection using the givenaction
.- Parameters:
action
- the action to apply- Since:
- 2.4.0
-