public class BuildContext
extends java.lang.Object
implements java.io.Closeable
ContainerConfiguration
, ImageConfiguration
, and LayerConfiguration
) held in are
immutable.Modifier and Type | Class and Description |
---|---|
static class |
BuildContext.Builder
Builds an immutable
BuildContext . |
Modifier and Type | Method and Description |
---|---|
static BuildContext.Builder |
builder()
Creates a new
BuildContext.Builder to build a BuildContext . |
void |
close() |
com.google.common.collect.ImmutableSet<java.lang.String> |
getAllTargetImageTags() |
boolean |
getAlwaysCacheBaseImage()
Gets whether or not to force caching the base images.
|
Cache |
getApplicationLayersCache()
Gets the
Cache for application layers. |
ImageConfiguration |
getBaseImageConfiguration() |
Cache |
getBaseImageLayersCache()
Gets the
Cache for base image layers. |
ContainerConfiguration |
getContainerConfiguration() |
EventHandlers |
getEventHandlers() |
java.util.concurrent.ExecutorService |
getExecutorService() |
com.google.common.collect.ImmutableList<LayerConfiguration> |
getLayerConfigurations()
Gets the configurations for building the layers.
|
java.lang.Class<? extends BuildableManifestTemplate> |
getTargetFormat() |
ImageConfiguration |
getTargetImageConfiguration() |
java.lang.String |
getToolName() |
boolean |
isOffline()
Gets whether or not to run the build in offline mode.
|
RegistryClient.Factory |
newBaseImageRegistryClientFactory()
Creates a new
RegistryClient.Factory for the base image with fields from the build
configuration. |
RegistryClient.Factory |
newTargetImageRegistryClientFactory()
Creates a new
RegistryClient.Factory for the target image with fields from the build
configuration. |
public static BuildContext.Builder builder()
BuildContext.Builder
to build a BuildContext
.BuildContext.Builder
public ImageConfiguration getBaseImageConfiguration()
public ImageConfiguration getTargetImageConfiguration()
public com.google.common.collect.ImmutableSet<java.lang.String> getAllTargetImageTags()
@Nullable public ContainerConfiguration getContainerConfiguration()
public java.lang.Class<? extends BuildableManifestTemplate> getTargetFormat()
public java.lang.String getToolName()
public EventHandlers getEventHandlers()
public java.util.concurrent.ExecutorService getExecutorService()
public Cache getBaseImageLayersCache()
Cache
for base image layers.Cache
for base image layerspublic Cache getApplicationLayersCache()
Cache
for application layers.Cache
for application layerspublic boolean isOffline()
true
if the build will run in offline mode; false
otherwisepublic boolean getAlwaysCacheBaseImage()
true
if the user wants to force the build to always pull the image layers.public com.google.common.collect.ImmutableList<LayerConfiguration> getLayerConfigurations()
public RegistryClient.Factory newBaseImageRegistryClientFactory()
RegistryClient.Factory
for the base image with fields from the build
configuration.RegistryClient.Factory
public RegistryClient.Factory newTargetImageRegistryClientFactory()
RegistryClient.Factory
for the target image with fields from the build
configuration.RegistryClient.Factory
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException