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. |
ImageReference |
getBuilder()
Return the builder that should be used.
|
Creator |
getCreator()
Return the
Creator the builder should use. |
Map<String,String> |
getEnv()
Return any env variable that should be passed to the builder.
|
ImageReference |
getName()
Return the name of the image that should be created.
|
PullPolicy |
getPullPolicy()
Return the image
PullPolicy that the builder should use. |
ImageReference |
getRunImage()
Return the run image that should be used, if provided.
|
boolean |
isCleanCache()
Return if caches should be cleaned before packaging.
|
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 |
withBuilder(ImageReference builder)
Return a new
BuildRequest with an updated builder. |
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 |
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 |
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 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 PullPolicy getPullPolicy()
PullPolicy
that the builder should use.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