类 BuildRequest
java.lang.Object
cn.taketoday.buildpack.platform.build.BuildRequest
A build request to be handled by the
Builder.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Scott Frederick, Andrey Shlykov, Jeroen Meijer, Rafael Ceccone, Julian Liebig, Harry Yang
-
字段概要
字段修饰符和类型字段说明private final Function<Owner,TarArchive> private final Stringprivate final Cacheprivate final ImageReferenceprivate final List<BuildpackReference>private final Cacheprivate final booleanprivate final Instantprivate final Creatorprivate static final ImageReference(专用程序包) static final Stringprivate final Cacheprivate final ImageReferenceprivate final Stringprivate final booleanprivate final PullPolicyprivate final ImageReferenceprivate final List<ImageReference>private final boolean -
构造器概要
构造器构造器说明BuildRequest(ImageReference name, Function<Owner, TarArchive> applicationContent) BuildRequest(ImageReference name, Function<Owner, TarArchive> applicationContent, ImageReference builder, ImageReference runImage, Creator creator, Map<String, String> env, boolean cleanCache, boolean verboseLogging, PullPolicy pullPolicy, boolean publish, List<BuildpackReference> buildpacks, List<Binding> bindings, String network, List<ImageReference> tags, Cache buildWorkspace, Cache buildCache, Cache launchCache, Instant createdDate, String applicationDirectory, List<String> securityOptions) -
方法概要
修饰符和类型方法说明private static voidassertJarFile(File jarFile) static BuildRequestforJarFile(ImageReference name, File jarFile) Factory method to create a newBuildRequestfrom a JAR file.static BuildRequestforJarFile(File jarFile) Factory method to create a newBuildRequestfrom a JAR file.getApplicationContent(Owner owner) Return aTarArchivecontaining the application content that the buildpack should package.Return the application directory that should be used by the lifecycle.Return the collection of bindings to mount to the build container.Return the custom build cache that should be used by the lifecycle.Return the builder that should be used.Return the collection of buildpacks to use when building the image, if provided.Return the custom created date that should be used by the lifecycle.Return theCreatorthe builder should use.getEnv()Return any env variable that should be passed to the builder.Return the custom launch cache that should be used by the lifecycle.getName()Return the name of the image that should be created.Return the network the build container will connect to.Return the imagePullPolicythat the builder should use.Return the run image that should be used, if provided.Return the security options that should be used by the lifecycle.getTags()Return the collection of tags that should be created.booleanReturn if caches should be cleaned before packaging.booleanReturn if the built image should be pushed to a registry.booleanReturn if verbose logging output should be used.static BuildRequestof(ImageReference name, Function<Owner, TarArchive> applicationContent) Factory method to create a newBuildRequestwith specific content.private InstantparseCreatedDate(String createdDate) withApplicationDirectory(String applicationDirectory) Return a newBuildRequestwith an updated application directory.withBindings(Binding... bindings) Return a newBuildRequestwith updated bindings.withBindings(List<Binding> bindings) Return a newBuildRequestwith updated bindings.withBuildCache(Cache buildCache) Return a newBuildRequestwith an updated build cache.withBuilder(ImageReference builder) Return a newBuildRequestwith an updated builder.withBuildpacks(BuildpackReference... buildpacks) Return a newBuildRequestwith an updated buildpacks setting.withBuildpacks(List<BuildpackReference> buildpacks) Return a newBuildRequestwith an updated buildpacks setting.withBuildWorkspace(Cache buildWorkspace) Return a newBuildRequestwith an updated build workspace.withCleanCache(boolean cleanCache) Return a newBuildRequestwith an updated clean cache setting.withCreatedDate(String createdDate) Return a newBuildRequestwith an updated created date.withCreator(Creator creator) Return a newBuildRequestwith an updated creator.Return a newBuildRequestwith an additional env variable.Return a newBuildRequestwith additional env variables.withLaunchCache(Cache launchCache) Return a newBuildRequestwith an updated launch cache.withNetwork(String network) Return a newBuildRequestwith an updated network setting.withPublish(boolean publish) Return a newBuildRequestwith an updated publish setting.withPullPolicy(PullPolicy pullPolicy) Return a newBuildRequestwith the updated image pull policy.withRunImage(ImageReference runImageName) Return a newBuildRequestwith an updated run image.withSecurityOptions(List<String> securityOptions) Return a newBuildRequestwith an updated security options.withTags(ImageReference... tags) Return a newBuildRequestwith updated tags.withTags(List<ImageReference> tags) Return a newBuildRequestwith updated tags.withVerboseLogging(boolean verboseLogging) Return a newBuildRequestwith an updated verbose logging setting.
-
字段详细资料
-
DEFAULT_BUILDER_IMAGE_NAME
- 另请参阅:
-
DEFAULT_BUILDER
-
name
-
applicationContent
-
builder
-
runImage
-
creator
-
env
-
cleanCache
private final boolean cleanCache -
verboseLogging
private final boolean verboseLogging -
pullPolicy
-
publish
private final boolean publish -
buildpacks
-
bindings
-
network
-
tags
-
buildWorkspace
-
buildCache
-
launchCache
-
createdDate
-
applicationDirectory
-
securityOptions
-
-
构造器详细资料
-
BuildRequest
BuildRequest(ImageReference name, Function<Owner, TarArchive> applicationContent) -
BuildRequest
BuildRequest(ImageReference name, Function<Owner, TarArchive> applicationContent, ImageReference builder, ImageReference runImage, Creator creator, Map<String, String> env, boolean cleanCache, boolean verboseLogging, PullPolicy pullPolicy, boolean publish, List<BuildpackReference> buildpacks, List<Binding> bindings, String network, List<ImageReference> tags, Cache buildWorkspace, Cache buildCache, Cache launchCache, Instant createdDate, String applicationDirectory, List<String> securityOptions)
-
-
方法详细资料
-
withBuilder
Return a newBuildRequestwith an updated builder.- 参数:
builder- the new builder to use- 返回:
- an updated build request
-
withRunImage
Return a newBuildRequestwith an updated run image.- 参数:
runImageName- the run image to use- 返回:
- an updated build request
-
withCreator
Return a newBuildRequestwith an updated creator.- 参数:
creator- the newCreatorto use- 返回:
- an updated build request
-
withEnv
Return a newBuildRequestwith an additional env variable.- 参数:
name- the variable namevalue- the variable value- 返回:
- an updated build request
-
withEnv
Return a newBuildRequestwith additional env variables.- 参数:
env- the additional variables- 返回:
- an updated build request
-
withCleanCache
Return a newBuildRequestwith an updated clean cache setting.- 参数:
cleanCache- if the cache should be cleaned- 返回:
- an updated build request
-
withVerboseLogging
Return a newBuildRequestwith an updated verbose logging setting.- 参数:
verboseLogging- if verbose logging should be used- 返回:
- an updated build request
-
withPullPolicy
Return a newBuildRequestwith the updated image pull policy.- 参数:
pullPolicy- image pull policyPullPolicy- 返回:
- an updated build request
-
withPublish
Return a newBuildRequestwith an updated publish setting.- 参数:
publish- if the built image should be pushed to a registry- 返回:
- an updated build request
-
withBuildpacks
Return a newBuildRequestwith an updated buildpacks setting.- 参数:
buildpacks- a collection of buildpacks to use when building the image- 返回:
- an updated build request
-
withBuildpacks
Return a newBuildRequestwith an updated buildpacks setting.- 参数:
buildpacks- a collection of buildpacks to use when building the image- 返回:
- an updated build request
-
withBindings
Return a newBuildRequestwith updated bindings.- 参数:
bindings- a collection of bindings to mount to the build container- 返回:
- an updated build request
-
withBindings
Return a newBuildRequestwith updated bindings.- 参数:
bindings- a collection of bindings to mount to the build container- 返回:
- an updated build request
-
withNetwork
Return a newBuildRequestwith an updated network setting.- 参数:
network- the network the build container will connect to- 返回:
- an updated build request
-
withTags
Return a newBuildRequestwith updated tags.- 参数:
tags- a collection of tags to be created for the built image- 返回:
- an updated build request
-
withTags
Return a newBuildRequestwith updated tags.- 参数:
tags- a collection of tags to be created for the built image- 返回:
- an updated build request
-
withBuildWorkspace
Return a newBuildRequestwith an updated build workspace.- 参数:
buildWorkspace- the build workspace- 返回:
- an updated build request
-
withBuildCache
Return a newBuildRequestwith an updated build cache.- 参数:
buildCache- the build cache- 返回:
- an updated build request
-
withLaunchCache
Return a newBuildRequestwith an updated launch cache.- 参数:
launchCache- the cache- 返回:
- an updated build request
-
withCreatedDate
Return a newBuildRequestwith an updated created date.- 参数:
createdDate- the created date- 返回:
- an updated build request
-
parseCreatedDate
-
withApplicationDirectory
Return a newBuildRequestwith an updated application directory.- 参数:
applicationDirectory- the application directory- 返回:
- an updated build request
-
withSecurityOptions
Return a newBuildRequestwith an updated security options.- 参数:
securityOptions- the security options- 返回:
- an updated build request
-
getName
Return the name of the image that should be created.- 返回:
- the name of the image
-
getApplicationContent
Return aTarArchivecontaining the application content that the buildpack should package. This is typically the contents of the Jar.- 参数:
owner- the owner of the tar entries- 返回:
- the application content
- 另请参阅:
-
getBuilder
Return the builder that should be used.- 返回:
- the builder to use
-
getRunImage
Return the run image that should be used, if provided.- 返回:
- the run image
-
getCreator
Return theCreatorthe builder should use.- 返回:
- the
Creator
-
getEnv
Return any env variable that should be passed to the builder.- 返回:
- the builder env
-
isCleanCache
public boolean isCleanCache()Return if caches should be cleaned before packaging.- 返回:
- if caches should be cleaned
-
isVerboseLogging
public boolean isVerboseLogging()Return if verbose logging output should be used.- 返回:
- if verbose logging should be used
-
isPublish
public boolean isPublish()Return if the built image should be pushed to a registry.- 返回:
- if the built image should be pushed to a registry
-
getPullPolicy
Return the imagePullPolicythat the builder should use.- 返回:
- image pull policy
-
getBuildpacks
Return the collection of buildpacks to use when building the image, if provided.- 返回:
- the buildpacks
-
getBindings
Return the collection of bindings to mount to the build container.- 返回:
- the bindings
-
getNetwork
Return the network the build container will connect to.- 返回:
- the network
-
getTags
Return the collection of tags that should be created.- 返回:
- the tags
-
getBuildWorkspace
-
getBuildCache
Return the custom build cache that should be used by the lifecycle.- 返回:
- the build cache
-
getLaunchCache
Return the custom launch cache that should be used by the lifecycle.- 返回:
- the launch cache
-
getCreatedDate
Return the custom created date that should be used by the lifecycle.- 返回:
- the created date
-
getApplicationDirectory
Return the application directory that should be used by the lifecycle.- 返回:
- the application directory
-
getSecurityOptions
Return the security options that should be used by the lifecycle.- 返回:
- the security options
-
forJarFile
Factory method to create a newBuildRequestfrom a JAR file.- 参数:
jarFile- the source jar file- 返回:
- a new build request instance
-
forJarFile
Factory method to create a newBuildRequestfrom a JAR file.- 参数:
name- the name of the image that should be createdjarFile- the source jar file- 返回:
- a new build request instance
-
of
Factory method to create a newBuildRequestwith specific content.- 参数:
name- the name of the image that should be createdapplicationContent- function to provide the application content- 返回:
- a new build request instance
-
assertJarFile
-