Modifier and Type | Method and Description |
---|---|
static BuildRequest |
forJarFile(File jarFile)
Factory method to create a new
BuildRequest from a JAR file. |
static BuildRequest |
forJarFile(ImageReference name,
File jarFile)
Factory method to create a new
BuildRequest from a JAR file. |
TarArchive |
getApplicationContent(Owner owner)
Return a
TarArchive containing the application content that the buildpack
should package. |
List<Binding> |
getBindings()
Return the collection of bindings to mount to the build container.
|
Cache |
getBuildCache()
Return the custom build cache that should be used by the lifecycle.
|
ImageReference |
getBuilder()
Return the builder that should be used.
|
List<BuildpackReference> |
getBuildpacks()
Return the collection of buildpacks to use when building the image, if provided.
|
Creator |
getCreator()
Return the
Creator the builder should use. |
Map<String,String> |
getEnv()
Return any env variable that should be passed to the builder.
|
Cache |
getLaunchCache()
Return the custom launch cache that should be used by the lifecycle.
|
ImageReference |
getName()
Return the name of the image that should be created.
|
String |
getNetwork()
Return the network the build container will connect to.
|
PullPolicy |
getPullPolicy()
Return the image
PullPolicy that the builder should use. |
ImageReference |
getRunImage()
Return the run image that should be used, if provided.
|
List<ImageReference> |
getTags()
Return the collection of tags that should be created.
|
boolean |
isCleanCache()
Return if caches should be cleaned before packaging.
|
boolean |
isPublish()
Return if the built image should be pushed to a registry.
|
boolean |
isVerboseLogging()
Return if verbose logging output should be used.
|
static BuildRequest |
of(ImageReference name,
Function<Owner,TarArchive> applicationContent)
Factory method to create a new
BuildRequest with specific content. |
BuildRequest |
withBindings(Binding... bindings)
Return a new
BuildRequest with updated bindings. |
BuildRequest |
withBindings(List<Binding> bindings)
Return a new
BuildRequest with updated bindings. |
BuildRequest |
withBuildCache(Cache buildCache)
Return a new
BuildRequest with an updated build cache. |
BuildRequest |
withBuilder(ImageReference builder)
Return a new
BuildRequest with an updated builder. |
BuildRequest |
withBuildpacks(BuildpackReference... buildpacks)
Return a new
BuildRequest with an updated buildpacks setting. |
BuildRequest |
withBuildpacks(List<BuildpackReference> buildpacks)
Return a new
BuildRequest with an updated buildpacks setting. |
BuildRequest |
withCleanCache(boolean cleanCache)
Return a new
BuildRequest with an updated clean cache setting. |
BuildRequest |
withCreator(Creator creator)
Return a new
BuildRequest with an updated creator. |
BuildRequest |
withEnv(Map<String,String> env)
Return a new
BuildRequest with additional env variables. |
BuildRequest |
withEnv(String name,
String value)
Return a new
BuildRequest with an additional env variable. |
BuildRequest |
withLaunchCache(Cache launchCache)
Return a new
BuildRequest with an updated launch cache. |
BuildRequest |
withNetwork(String network)
Return a new
BuildRequest with an updated network setting. |
BuildRequest |
withPublish(boolean publish)
Return a new
BuildRequest with an updated publish setting. |
BuildRequest |
withPullPolicy(PullPolicy pullPolicy)
Return a new
BuildRequest with the updated image pull policy. |
BuildRequest |
withRunImage(ImageReference runImageName)
Return a new
BuildRequest with an updated run image. |
BuildRequest |
withTags(ImageReference... tags)
Return a new
BuildRequest with updated tags. |
BuildRequest |
withTags(List<ImageReference> tags)
Return a new
BuildRequest with updated tags. |
BuildRequest |
withVerboseLogging(boolean verboseLogging)
Return a new
BuildRequest with an updated verbose logging setting. |
public BuildRequest withBuilder(ImageReference builder)
BuildRequest
with an updated builder.builder
- the new builder to usepublic BuildRequest withRunImage(ImageReference runImageName)
BuildRequest
with an updated run image.runImageName
- the run image to usepublic BuildRequest withCreator(Creator creator)
BuildRequest
with an updated creator.creator
- the new Creator
to usepublic BuildRequest withEnv(String name, String value)
BuildRequest
with an additional env variable.name
- the variable namevalue
- the variable valuepublic BuildRequest withEnv(Map<String,String> env)
BuildRequest
with additional env variables.env
- the additional variablespublic BuildRequest withCleanCache(boolean cleanCache)
BuildRequest
with an updated clean cache setting.cleanCache
- if the cache should be cleanedpublic BuildRequest withVerboseLogging(boolean verboseLogging)
BuildRequest
with an updated verbose logging setting.verboseLogging
- if verbose logging should be usedpublic BuildRequest withPullPolicy(PullPolicy pullPolicy)
BuildRequest
with the updated image pull policy.pullPolicy
- image pull policy PullPolicy
public BuildRequest withPublish(boolean publish)
BuildRequest
with an updated publish setting.publish
- if the built image should be pushed to a registrypublic BuildRequest withBuildpacks(BuildpackReference... buildpacks)
BuildRequest
with an updated buildpacks setting.buildpacks
- a collection of buildpacks to use when building the imagepublic BuildRequest withBuildpacks(List<BuildpackReference> buildpacks)
BuildRequest
with an updated buildpacks setting.buildpacks
- a collection of buildpacks to use when building the imagepublic BuildRequest withBindings(Binding... bindings)
BuildRequest
with updated bindings.bindings
- a collection of bindings to mount to the build containerpublic BuildRequest withBindings(List<Binding> bindings)
BuildRequest
with updated bindings.bindings
- a collection of bindings to mount to the build containerpublic BuildRequest withNetwork(String network)
BuildRequest
with an updated network setting.network
- the network the build container will connect topublic BuildRequest withTags(ImageReference... tags)
BuildRequest
with updated tags.tags
- a collection of tags to be created for the built imagepublic BuildRequest withTags(List<ImageReference> tags)
BuildRequest
with updated tags.tags
- a collection of tags to be created for the built imagepublic BuildRequest withBuildCache(Cache buildCache)
BuildRequest
with an updated build cache.buildCache
- the build cachepublic BuildRequest withLaunchCache(Cache launchCache)
BuildRequest
with an updated launch cache.launchCache
- the cachepublic ImageReference getName()
public TarArchive getApplicationContent(Owner owner)
TarArchive
containing the application content that the buildpack
should package. This is typically the contents of the Jar.owner
- the owner of the tar entriesTarArchive.fromZip(File, Owner)
public ImageReference getBuilder()
public ImageReference getRunImage()
public Creator getCreator()
Creator
the builder should use.Creator
public Map<String,String> getEnv()
public boolean isCleanCache()
public boolean isVerboseLogging()
public boolean isPublish()
public PullPolicy getPullPolicy()
PullPolicy
that the builder should use.public List<BuildpackReference> getBuildpacks()
public List<Binding> getBindings()
public String getNetwork()
public List<ImageReference> getTags()
public Cache getBuildCache()
public Cache getLaunchCache()
public static BuildRequest forJarFile(File jarFile)
BuildRequest
from a JAR file.jarFile
- the source jar filepublic static BuildRequest forJarFile(ImageReference name, File jarFile)
BuildRequest
from a JAR file.name
- the name of the image that should be createdjarFile
- the source jar filepublic static BuildRequest of(ImageReference name, Function<Owner,TarArchive> applicationContent)
BuildRequest
with specific content.name
- the name of the image that should be createdapplicationContent
- function to provide the application content