public class BootBuildImage
extends org.gradle.api.DefaultTask
Task
for bundling an application into an OCI image using a
buildpack.Constructor and Description |
---|
BootBuildImage() |
Modifier and Type | Method and Description |
---|---|
void |
docker(org.gradle.api.Action<DockerSpec> action)
Configures the Docker connection using the given
action . |
void |
docker(groovy.lang.Closure<?> closure)
Configures the Docker connection using the given
closure . |
void |
environment(java.util.Map<java.lang.String,java.lang.String> entries)
Adds entries to the environment that will be used when building the image.
|
void |
environment(java.lang.String name,
java.lang.String value)
Add an entry to the environment that will be used when building the image.
|
java.lang.String |
getBuilder()
Returns the builder that will be used to build the image.
|
DockerSpec |
getDocker()
Returns the Docker configuration the builder will use.
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
Returns the environment that will be used when building the image.
|
java.lang.String |
getImageName()
Returns the name of the image that will be built.
|
org.gradle.api.file.RegularFileProperty |
getJar()
Returns the property for the jar file from which the image will be built.
|
org.springframework.boot.buildpack.platform.build.PullPolicy |
getPullPolicy()
Returns image pull policy that will be used when building the image.
|
java.lang.String |
getRunImage()
Returns the run image that will be included in the built image.
|
org.gradle.api.provider.Property<org.gradle.api.JavaVersion> |
getTargetJavaVersion()
Returns the target Java version of the project (e.g.
|
boolean |
isCleanCache()
Returns whether caches should be cleaned before packaging.
|
boolean |
isPublish()
Whether the built image should be pushed to a registry.
|
boolean |
isVerboseLogging()
Whether verbose logging should be enabled while building the image.
|
void |
setBuilder(java.lang.String builder)
Sets the builder that will be used to build the image.
|
void |
setCleanCache(boolean cleanCache)
Sets whether caches should be cleaned before packaging.
|
void |
setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Sets the environment that will be used when building the image.
|
void |
setImageName(java.lang.String imageName)
Sets the name of the image that will be built.
|
void |
setPublish(boolean publish)
Sets whether the built image should be pushed to a registry.
|
void |
setPullPolicy(org.springframework.boot.buildpack.platform.build.PullPolicy pullPolicy)
Sets image pull policy that will be used when building the image.
|
void |
setRunImage(java.lang.String runImage)
Sets the run image that will be included in the built image.
|
void |
setVerboseLogging(boolean verboseLogging)
Sets whether verbose logging should be enabled while building the image.
|
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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
appendParallelSafeAction, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, replaceLogger, setImpliesSubProjects
@Input @Optional public org.gradle.api.file.RegularFileProperty getJar()
@Input @Optional public org.gradle.api.provider.Property<org.gradle.api.JavaVersion> getTargetJavaVersion()
targetCompatibility
build property).@Input @Optional public java.lang.String getImageName()
null
, the name will
be derived from the Project's
name
and
version
.public void setImageName(java.lang.String imageName)
imageName
- name of the image@Input @Optional public java.lang.String getBuilder()
null
, the
default builder will be used.public void setBuilder(java.lang.String builder)
builder
- the builder@Input @Optional public java.lang.String getRunImage()
null
,
the run image bundled with the builder will be used.public void setRunImage(java.lang.String runImage)
runImage
- the run image@Input public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
environment
- the environmentpublic void environment(java.lang.String name, java.lang.String value)
name
- the name of the entryvalue
- the value of the entrypublic void environment(java.util.Map<java.lang.String,java.lang.String> entries)
entries
- the entries to add to the environment@Input public boolean isCleanCache()
public void setCleanCache(boolean cleanCache)
cleanCache
- true
to clean the cache, otherwise false
.@Input public boolean isVerboseLogging()
public void setVerboseLogging(boolean verboseLogging)
verboseLogging
- true
to enable verbose logging, otherwise
false
.@Input @Optional public org.springframework.boot.buildpack.platform.build.PullPolicy getPullPolicy()
public void setPullPolicy(org.springframework.boot.buildpack.platform.build.PullPolicy pullPolicy)
pullPolicy
- image pull policy PullPolicy
@Input public boolean isPublish()
public void setPublish(boolean publish)
publish
- true
the push the built image to a registry. false
.public DockerSpec getDocker()
public void docker(org.gradle.api.Action<DockerSpec> action)
action
.action
- the action to applypublic void docker(groovy.lang.Closure<?> closure)
closure
.closure
- the closure to apply