类 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 CacheSpec
     
    private final CacheSpec
     
    private final DockerSpec
     
    private final CacheSpec
     
    private final String
     
    private 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
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    buildCache(org.gradle.api.Action<CacheSpec> action)
    Customizes the CacheSpec for the build cache using the given action.
    (专用程序包) void
     
    void
    buildWorkspace(org.gradle.api.Action<CacheSpec> action)
    Customizes the CacheSpec for the build temporary workspace using the given action.
    (专用程序包) cn.taketoday.buildpack.platform.build.BuildRequest
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customize(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeApplicationDirectory(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeBindings(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeBuilder(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeBuildpacks(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeCaches(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeCreatedDate(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeCreator(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeEnvironment(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizePublish(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizePullPolicy(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeRunImage(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeSecurityOptions(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    private cn.taketoday.buildpack.platform.build.BuildRequest
    customizeTags(cn.taketoday.buildpack.platform.build.BuildRequest request)
     
    void
    docker(org.gradle.api.Action<DockerSpec> action)
    Configures the Docker connection using the given action.
    abstract org.gradle.api.provider.Property<String>
    Returns the directory that contains application content in the image.
    abstract org.gradle.api.file.RegularFileProperty
    Returns 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 the Created date of the image.
    Returns the Docker configuration the builder will use.
    abstract org.gradle.api.provider.MapProperty<String,String>
    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>
    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.
    void
    launchCache(org.gradle.api.Action<CacheSpec> action)
    Customizes the CacheSpec for the launch cache using the given action.
    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
  • 字段详细资料

    • pullPolicy

      private final org.gradle.api.provider.Property<cn.taketoday.buildpack.platform.build.PullPolicy> pullPolicy
    • projectName

      private final String projectName
    • buildWorkspace

      private final CacheSpec buildWorkspace
    • buildCache

      private final CacheSpec buildCache
    • launchCache

      private final CacheSpec launchCache
    • docker

      private final DockerSpec 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

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getImageName()
      Returns the name of the image that will be built. When null, the name will be derived from the Project's name and version.
      返回:
      name of the image
    • getBuilder

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getBuilder()
      Returns the builder that will be used to build the image. When null, the default builder will be used.
      返回:
      the builder
    • getRunImage

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getRunImage()
      Returns the run image that will be included in the built image. When null, the run image bundled with the builder will be used.
      返回:
      the run image
    • getEnvironment

      @Input public abstract org.gradle.api.provider.MapProperty<String,String> getEnvironment()
      Returns the environment that will be used when building the image.
      返回:
      the environment
    • getCleanCache

      @Input public abstract org.gradle.api.provider.Property<Boolean> getCleanCache()
      Returns whether caches should be cleaned before packaging.
      返回:
      whether caches should be cleaned
    • getVerboseLogging

      @Input public abstract org.gradle.api.provider.Property<Boolean> 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

      public void setPullPolicy(String pullPolicy)
      Sets image pull policy that will be used when building the image.
      参数:
      pullPolicy - the pull policy to use
    • getPublish

      @Input public abstract org.gradle.api.provider.Property<Boolean> getPublish()
      Whether the built image should be pushed to a registry.
      返回:
      whether the built image should be pushed
    • getBuildpacks

      @Input @Optional public abstract org.gradle.api.provider.ListProperty<String> getBuildpacks()
      Returns the buildpacks that will be used when building the image.
      返回:
      the buildpack references
    • getBindings

      @Input @Optional public abstract org.gradle.api.provider.ListProperty<String> getBindings()
      Returns the volume bindings that will be mounted to the container when building the image.
      返回:
      the bindings
    • getTags

      @Input @Optional public abstract org.gradle.api.provider.ListProperty<String> getTags()
      Returns the tags that will be created for the built image.
      返回:
      the tags
    • getNetwork

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getNetwork()
      Returns the network the build container will connect to.
      返回:
      the network
    • getBuildWorkspace

      @Optional public CacheSpec getBuildWorkspace()
      Returns the build temporary workspace that will be used when building the image.
      返回:
      the cache
    • buildWorkspace

      public void buildWorkspace(org.gradle.api.Action<CacheSpec> action)
      Customizes the CacheSpec for the build temporary workspace using the given action.
      参数:
      action - the action
    • getBuildCache

      @Optional public CacheSpec getBuildCache()
      Returns the build cache that will be used when building the image.
      返回:
      the cache
    • buildCache

      public void buildCache(org.gradle.api.Action<CacheSpec> action)
      Customizes the CacheSpec for the build cache using the given action.
      参数:
      action - the action
    • getLaunchCache

      @Optional public CacheSpec getLaunchCache()
      Returns the launch cache that will be used when building the image.
      返回:
      the cache
    • launchCache

      public void launchCache(org.gradle.api.Action<CacheSpec> action)
      Customizes the CacheSpec for the launch cache using the given action.
      参数:
      action - the action
    • getCreatedDate

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getCreatedDate()
      Returns the date that will be used as the Created date of the image. When null, a fixed date that enables build reproducibility will be used.
      返回:
      the created date
    • getApplicationDirectory

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getApplicationDirectory()
      Returns the directory that contains application content in the image. When null, a default location will be used.
      返回:
      the application directory
    • getSecurityOptions

      @Input @Optional public abstract org.gradle.api.provider.ListProperty<String> getSecurityOptions()
      Returns the security options that will be applied to the builder container.
      返回:
      the security options
    • getDocker

      public DockerSpec getDocker()
      Returns the Docker configuration the builder will use.
      返回:
      docker configuration.
    • docker

      public void docker(org.gradle.api.Action<DockerSpec> action)
      Configures the Docker connection using the given action.
      参数:
      action - the action to apply
    • buildImage

      void buildImage() throws cn.taketoday.buildpack.platform.docker.transport.DockerEngineException, IOException
      抛出:
      cn.taketoday.buildpack.platform.docker.transport.DockerEngineException
      IOException
    • 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)