类 BootBuildImage
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.springframework.boot.gradle.tasks.bundling.BootBuildImage
- 所有已实现的接口:
Comparable<Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.TaskInternal
,Named
,ExtensionAware
,Task
,Configurable<Task>
- 从以下版本开始:
- 2.3.0
- 作者:
- Andy Wilkinson, Scott Frederick, Rafael Ceccone, Jeroen Meijer, Julian Liebig
-
嵌套类概要
从接口继承的嵌套类/接口 org.gradle.api.Task
Task.Namer
-
字段概要
从接口继承的字段 org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
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.从类继承的方法 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
从类继承的方法 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
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
构造器详细资料
-
BootBuildImage
public BootBuildImage()
-
-
方法详细资料
-
getArchiveFile
Returns the property for the archive file from which the image will be built.- 返回:
- the archive file property
-
getImageName
Returns the name of the image that will be built. Whennull
, the name will be derived from theProject's
name
andversion
.- 返回:
- name of the image
-
getBuilder
Returns the builder that will be used to build the image. Whennull
, the default builder will be used.- 返回:
- the builder
-
getTrustBuilder
Whether to treat the builder as trusted.- 返回:
- whether to trust the builder
- 从以下版本开始:
- 3.4.0
-
getRunImage
Returns the run image that will be included in the built image. Whennull
, the run image bundled with the builder will be used.- 返回:
- the run image
-
getEnvironment
Returns the environment that will be used when building the image.- 返回:
- the environment
-
getCleanCache
Returns whether caches should be cleaned before packaging.- 返回:
- whether caches should be cleaned
- 从以下版本开始:
- 3.0.0
-
getVerboseLogging
Whether verbose logging should be enabled while building the image.- 返回:
- whether verbose logging should be enabled
- 从以下版本开始:
- 3.0.0
-
getPullPolicy
@Input @Optional public Property<org.springframework.boot.buildpack.platform.build.PullPolicy> getPullPolicy()Returns image pull policy that will be used when building the image.- 返回:
- whether images should be pulled
-
setPullPolicy
Sets image pull policy that will be used when building the image.- 参数:
pullPolicy
- the pull policy to use
-
getPublish
Whether the built image should be pushed to a registry.- 返回:
- whether the built image should be pushed
- 从以下版本开始:
- 3.0.0
-
getBuildpacks
Returns the buildpacks that will be used when building the image.- 返回:
- the buildpack references
-
getBindings
Returns the volume bindings that will be mounted to the container when building the image.- 返回:
- the bindings
-
getTags
Returns the tags that will be created for the built image.- 返回:
- the tags
-
getNetwork
Returns the network the build container will connect to.- 返回:
- the network
-
getBuildWorkspace
Returns the build temporary workspace that will be used when building the image.- 返回:
- the cache
- 从以下版本开始:
- 3.2.0
-
buildWorkspace
Customizes theCacheSpec
for the build temporary workspace using the givenaction
.- 参数:
action
- the action- 从以下版本开始:
- 3.2.0
-
getBuildCache
Returns the build cache that will be used when building the image.- 返回:
- the cache
-
buildCache
Customizes theCacheSpec
for the build cache using the givenaction
.- 参数:
action
- the action
-
getLaunchCache
Returns the launch cache that will be used when building the image.- 返回:
- the cache
-
launchCache
Customizes theCacheSpec
for the launch cache using the givenaction
.- 参数:
action
- the action
-
getCreatedDate
Returns the date that will be used as theCreated
date of the image. Whennull
, a fixed date that enables build reproducibility will be used.- 返回:
- the created date
-
getApplicationDirectory
Returns the directory that contains application content in the image. Whennull
, a default location will be used.- 返回:
- the application directory
-
getSecurityOptions
Returns the security options that will be applied to the builder container.- 返回:
- the security options
-
getImagePlatform
Returns the platform (os/architecture/variant) that will be used for all pulled images. Whennull
, the system will choose a platform based on the host operating system and architecture.- 返回:
- the image platform
-
getDocker
Returns the Docker configuration the builder will use.- 返回:
- docker configuration.
- 从以下版本开始:
- 2.4.0
-
docker
Configures the Docker connection using the givenaction
.- 参数:
action
- the action to apply- 从以下版本开始:
- 2.4.0
-