#[non_exhaustive]pub struct BuildpacksBuild {
pub runtime: String,
pub function_target: String,
pub cache_image_uri: String,
pub base_image: String,
pub environment_variables: HashMap<String, String>,
pub enable_automatic_updates: bool,
pub project_descriptor: String,
/* private fields */
}Expand description
Build the source using Buildpacks.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.runtime: StringThe runtime name, e.g. ‘go113’. Leave blank for generic builds.
function_target: StringOptional. Name of the function target if the source is a function source. Required for function builds.
cache_image_uri: StringOptional. cache_image_uri is the GCR/AR URL where the cache image will be stored. cache_image_uri is optional and omitting it will disable caching. This URL must be stable across builds. It is used to derive a build-specific temporary URL by substituting the tag with the build ID. The build will clean up the temporary image on a best-effort basis.
base_image: StringOptional. The base image to use for the build.
environment_variables: HashMap<String, String>Optional. User-provided build-time environment variables.
enable_automatic_updates: boolOptional. Whether or not the application container will be enrolled in automatic base image updates. When true, the application will be built on a scratch base image, so the base layers can be appended at run time.
project_descriptor: StringOptional. project_descriptor stores the path to the project descriptor file. When empty, it means that there is no project descriptor file in the source.
Implementations§
Source§impl BuildpacksBuild
impl BuildpacksBuild
pub fn new() -> Self
Sourcepub fn set_runtime<T: Into<String>>(self, v: T) -> Self
👎Deprecated
pub fn set_runtime<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_function_target<T: Into<String>>(self, v: T) -> Self
pub fn set_function_target<T: Into<String>>(self, v: T) -> Self
Sets the value of function_target.
§Example
let x = BuildpacksBuild::new().set_function_target("example");Sourcepub fn set_cache_image_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_cache_image_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of cache_image_uri.
§Example
let x = BuildpacksBuild::new().set_cache_image_uri("example");Sourcepub fn set_base_image<T: Into<String>>(self, v: T) -> Self
pub fn set_base_image<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_environment_variables<T, K, V>(self, v: T) -> Self
pub fn set_environment_variables<T, K, V>(self, v: T) -> Self
Sets the value of environment_variables.
§Example
let x = BuildpacksBuild::new().set_environment_variables([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_enable_automatic_updates<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_automatic_updates<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_automatic_updates.
§Example
let x = BuildpacksBuild::new().set_enable_automatic_updates(true);Sourcepub fn set_project_descriptor<T: Into<String>>(self, v: T) -> Self
pub fn set_project_descriptor<T: Into<String>>(self, v: T) -> Self
Sets the value of project_descriptor.
§Example
let x = BuildpacksBuild::new().set_project_descriptor("example");Trait Implementations§
Source§impl Clone for BuildpacksBuild
impl Clone for BuildpacksBuild
Source§fn clone(&self) -> BuildpacksBuild
fn clone(&self) -> BuildpacksBuild
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more