pub trait CloudBuild: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn is_applicable(&self) -> bool;
fn is_pull_request(&self) -> bool;
fn building_branch(&self) -> Option<String>;
fn building_tag(&self) -> Option<String>;
fn git_commit_id(&self) -> Option<String>;
fn set_cloud_build_number(
&self,
build_number: &str,
stdout: &mut dyn Write,
stderr: &mut dyn Write,
) -> Result<EnvironmentVariables>;
fn set_cloud_build_variable(
&self,
name: &str,
value: &str,
stdout: &mut dyn Write,
stderr: &mut dyn Write,
) -> Result<EnvironmentVariables>;
}Expand description
Describes a supported cloud-build service.
Required Methods§
Sourcefn is_applicable(&self) -> bool
fn is_applicable(&self) -> bool
Returns whether this provider recognizes the current environment.
Sourcefn is_pull_request(&self) -> bool
fn is_pull_request(&self) -> bool
Returns whether the current build validates a pull request.
Sourcefn building_branch(&self) -> Option<String>
fn building_branch(&self) -> Option<String>
Returns the fully qualified branch ref being built, when known.
Sourcefn building_tag(&self) -> Option<String>
fn building_tag(&self) -> Option<String>
Returns the fully qualified tag ref being built, when known.
Sourcefn git_commit_id(&self) -> Option<String>
fn git_commit_id(&self) -> Option<String>
Returns the Git commit ID being built, when supplied by the provider.
Sourcefn set_cloud_build_number(
&self,
build_number: &str,
stdout: &mut dyn Write,
stderr: &mut dyn Write,
) -> Result<EnvironmentVariables>
fn set_cloud_build_number( &self, build_number: &str, stdout: &mut dyn Write, stderr: &mut dyn Write, ) -> Result<EnvironmentVariables>
Updates the provider’s build number and returns environment changes for the caller.
Sourcefn set_cloud_build_variable(
&self,
name: &str,
value: &str,
stdout: &mut dyn Write,
stderr: &mut dyn Write,
) -> Result<EnvironmentVariables>
fn set_cloud_build_variable( &self, name: &str, value: &str, stdout: &mut dyn Write, stderr: &mut dyn Write, ) -> Result<EnvironmentVariables>
Sets a provider variable and returns environment changes for the caller.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".