类 InfraBuildImage
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
cn.taketoday.gradle.tasks.bundling.InfraBuildImage
- 所有已实现的接口:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@DisableCachingByDefault
public abstract class InfraBuildImage
extends org.gradle.api.DefaultTask
A
Task for bundling an application into an OCI image using a
buildpack.- 从以下版本开始:
- 4.0
- 作者:
- Andy Wilkinson, Scott Frederick, Rafael Ceccone, Jeroen Meijer, Julian Liebig, Harry Yang
-
嵌套类概要
从接口继承的嵌套类/接口 org.gradle.api.Task
org.gradle.api.Task.Namer -
字段概要
字段修饰符和类型字段说明private final CacheSpecprivate final CacheSpecprivate final DockerSpecprivate final CacheSpecprivate final Stringprivate final org.gradle.api.provider.Property<cn.taketoday.buildpack.platform.build.PullPolicy>从接口继承的字段 org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidbuildCache(org.gradle.api.Action<CacheSpec> action) Customizes theCacheSpecfor the build cache using the givenaction.(专用程序包) voidvoidbuildWorkspace(org.gradle.api.Action<CacheSpec> action) Customizes theCacheSpecfor the build temporary workspace using the givenaction.(专用程序包) cn.taketoday.buildpack.platform.build.BuildRequestprivate cn.taketoday.buildpack.platform.build.BuildRequestcustomize(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeApplicationDirectory(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeBindings(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeBuilder(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeBuildpacks(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeCaches(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeCreatedDate(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeCreator(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeEnvironment(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizePublish(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizePullPolicy(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeRunImage(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeSecurityOptions(cn.taketoday.buildpack.platform.build.BuildRequest request) private cn.taketoday.buildpack.platform.build.BuildRequestcustomizeTags(cn.taketoday.buildpack.platform.build.BuildRequest request) voiddocker(org.gradle.api.Action<DockerSpec> action) Configures the Docker connection using the givenaction.abstract org.gradle.api.provider.Property<String>Returns the directory that contains application content in the image.abstract org.gradle.api.file.RegularFilePropertyReturns the property for the archive file from which the image will be built.abstract org.gradle.api.provider.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.abstract org.gradle.api.provider.Property<String>Returns the builder that will be used to build the image.abstract org.gradle.api.provider.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.abstract org.gradle.api.provider.Property<Boolean>Returns whether caches should be cleaned before packaging.abstract org.gradle.api.provider.Property<String>Returns the date that will be used as theCreateddate of the image.Returns the Docker configuration the builder will use.Returns the environment that will be used when building the image.abstract org.gradle.api.provider.Property<String>Returns the name of the image that will be built.Returns the launch cache that will be used when building the image.abstract org.gradle.api.provider.Property<String>Returns the network the build container will connect to.abstract org.gradle.api.provider.Property<Boolean>Whether the built image should be pushed to a registry.org.gradle.api.provider.Property<cn.taketoday.buildpack.platform.build.PullPolicy>Returns image pull policy that will be used when building the image.abstract org.gradle.api.provider.Property<String>Returns the run image that will be included in the built image.abstract org.gradle.api.provider.ListProperty<String>Returns the security options that will be applied to the builder container.abstract org.gradle.api.provider.ListProperty<String>getTags()Returns the tags that will be created for the built image.abstract org.gradle.api.provider.Property<Boolean>Whether verbose logging should be enabled while building the image.voidlaunchCache(org.gradle.api.Action<CacheSpec> action) Customizes theCacheSpecfor the launch cache using the givenaction.voidsetPullPolicy(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
-
字段详细资料
-
pullPolicy
private final org.gradle.api.provider.Property<cn.taketoday.buildpack.platform.build.PullPolicy> pullPolicy -
projectName
-
buildWorkspace
-
buildCache
-
launchCache
-
docker
-
-
构造器详细资料
-
InfraBuildImage
public InfraBuildImage()
-
-
方法详细资料
-
getArchiveFile
@InputFile @PathSensitive(RELATIVE) public abstract org.gradle.api.file.RegularFileProperty 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'snameandversion.- 返回:
- 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
-
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
-
getVerboseLogging
Whether verbose logging should be enabled while building the image.- 返回:
- whether verbose logging should be enabled
-
getPullPolicy
@Input @Optional public org.gradle.api.provider.Property<cn.taketoday.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
-
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
-
buildWorkspace
Customizes theCacheSpecfor the build temporary workspace using the givenaction.- 参数:
action- the action
-
getBuildCache
Returns the build cache that will be used when building the image.- 返回:
- the cache
-
buildCache
Customizes theCacheSpecfor 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 theCacheSpecfor the launch cache using the givenaction.- 参数:
action- the action
-
getCreatedDate
Returns the date that will be used as theCreateddate 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
-
getDocker
Returns the Docker configuration the builder will use.- 返回:
- docker configuration.
-
docker
Configures the Docker connection using the givenaction.- 参数:
action- the action to apply
-
buildImage
void buildImage() throws cn.taketoday.buildpack.platform.docker.transport.DockerEngineException, IOException- 抛出:
cn.taketoday.buildpack.platform.docker.transport.DockerEngineExceptionIOException
-
createRequest
cn.taketoday.buildpack.platform.build.BuildRequest createRequest() -
customize
private cn.taketoday.buildpack.platform.build.BuildRequest customize(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeBuilder
private cn.taketoday.buildpack.platform.build.BuildRequest customizeBuilder(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeRunImage
private cn.taketoday.buildpack.platform.build.BuildRequest customizeRunImage(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeEnvironment
private cn.taketoday.buildpack.platform.build.BuildRequest customizeEnvironment(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeCreator
private cn.taketoday.buildpack.platform.build.BuildRequest customizeCreator(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizePullPolicy
private cn.taketoday.buildpack.platform.build.BuildRequest customizePullPolicy(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizePublish
private cn.taketoday.buildpack.platform.build.BuildRequest customizePublish(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeBuildpacks
private cn.taketoday.buildpack.platform.build.BuildRequest customizeBuildpacks(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeBindings
private cn.taketoday.buildpack.platform.build.BuildRequest customizeBindings(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeTags
private cn.taketoday.buildpack.platform.build.BuildRequest customizeTags(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeCaches
private cn.taketoday.buildpack.platform.build.BuildRequest customizeCaches(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeCreatedDate
private cn.taketoday.buildpack.platform.build.BuildRequest customizeCreatedDate(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeApplicationDirectory
private cn.taketoday.buildpack.platform.build.BuildRequest customizeApplicationDirectory(cn.taketoday.buildpack.platform.build.BuildRequest request) -
customizeSecurityOptions
private cn.taketoday.buildpack.platform.build.BuildRequest customizeSecurityOptions(cn.taketoday.buildpack.platform.build.BuildRequest request)
-