public static class BuildConfiguration.Builder extends Object
BuildConfiguration. Instantiate with BuildConfiguration.builder().| Modifier and Type | Method and Description |
|---|---|
BuildConfiguration |
build()
Builds a new
BuildConfiguration using the parameters passed into the builder. |
BuildConfiguration.Builder |
setAdditionalTargetImageTags(Set<String> tags)
Sets the tags to tag the target image with (in addition to the tag in the target image
configuration image reference set via
setTargetImageConfiguration(com.google.cloud.tools.jib.configuration.ImageConfiguration)). |
BuildConfiguration.Builder |
setAllowInsecureRegistries(boolean allowInsecureRegistries)
Sets whether or not to allow communication over HTTP (as opposed to HTTPS).
|
BuildConfiguration.Builder |
setApplicationLayersCacheDirectory(Path applicationLayersCacheDirectory)
Sets the location of the cache for storing application layers.
|
BuildConfiguration.Builder |
setBaseImageConfiguration(ImageConfiguration imageConfiguration)
Sets the base image configuration.
|
BuildConfiguration.Builder |
setBaseImageLayersCacheDirectory(Path baseImageLayersCacheDirectory)
Sets the location of the cache for storing base image layers.
|
BuildConfiguration.Builder |
setContainerConfiguration(ContainerConfiguration containerConfiguration)
Sets configuration parameters for the container.
|
BuildConfiguration.Builder |
setEventHandlers(EventHandlers eventHandlers)
Sets the
EventHandlers to dispatch events with. |
BuildConfiguration.Builder |
setExecutorService(ExecutorService executorService)
Sets the
ExecutorService Jib executes on. |
BuildConfiguration.Builder |
setLayerConfigurations(List<LayerConfiguration> layerConfigurations)
Sets the layers to build.
|
BuildConfiguration.Builder |
setOffline(boolean offline)
Sets whether or not to perform the build in offline mode.
|
BuildConfiguration.Builder |
setTargetFormat(ImageFormat targetFormat)
Sets the target format of the container image.
|
BuildConfiguration.Builder |
setTargetImageConfiguration(ImageConfiguration imageConfiguration)
Sets the target image configuration.
|
BuildConfiguration.Builder |
setToolName(String toolName)
Sets the name of the tool that is executing the build.
|
public BuildConfiguration.Builder setBaseImageConfiguration(ImageConfiguration imageConfiguration)
imageConfiguration - the ImageConfiguration describing the base imagepublic BuildConfiguration.Builder setTargetImageConfiguration(ImageConfiguration imageConfiguration)
imageConfiguration - the ImageConfiguration describing the target imagepublic BuildConfiguration.Builder setAdditionalTargetImageTags(Set<String> tags)
setTargetImageConfiguration(com.google.cloud.tools.jib.configuration.ImageConfiguration)).tags - a set of tagspublic BuildConfiguration.Builder setContainerConfiguration(ContainerConfiguration containerConfiguration)
containerConfiguration - the ContainerConfigurationpublic BuildConfiguration.Builder setApplicationLayersCacheDirectory(Path applicationLayersCacheDirectory)
applicationLayersCacheDirectory - the application layers cache directorypublic BuildConfiguration.Builder setBaseImageLayersCacheDirectory(Path baseImageLayersCacheDirectory)
baseImageLayersCacheDirectory - the base image layers cache directorypublic BuildConfiguration.Builder setTargetFormat(ImageFormat targetFormat)
targetFormat - the target formatpublic BuildConfiguration.Builder setAllowInsecureRegistries(boolean allowInsecureRegistries)
allowInsecureRegistries - if true, insecure connections will be allowedpublic BuildConfiguration.Builder setOffline(boolean offline)
offline - if true, the build will run in offline modepublic BuildConfiguration.Builder setLayerConfigurations(List<LayerConfiguration> layerConfigurations)
layerConfigurations - the configurations for the layerspublic BuildConfiguration.Builder setToolName(String toolName)
toolName - the tool namepublic BuildConfiguration.Builder setEventHandlers(EventHandlers eventHandlers)
EventHandlers to dispatch events with.eventHandlers - the EventHandlerspublic BuildConfiguration.Builder setExecutorService(ExecutorService executorService)
ExecutorService Jib executes on. By default, Jib uses Executors.newCachedThreadPool().executorService - the ExecutorServicepublic BuildConfiguration build() throws IOException
BuildConfiguration using the parameters passed into the builder.IOException - if an I/O exception occursCopyright © 2019. All rights reserved.