pub struct BuildTrigger {Show 27 fields
pub approval_config: Option<ApprovalConfig>,
pub autodetect: Option<bool>,
pub bitbucket_server_trigger_config: Option<BitbucketServerTriggerConfig>,
pub build: Option<Build>,
pub create_time: Option<DateTime<Utc>>,
pub description: Option<String>,
pub disabled: Option<bool>,
pub event_type: Option<String>,
pub filename: Option<String>,
pub filter: Option<String>,
pub git_file_source: Option<GitFileSource>,
pub github: Option<GitHubEventsConfig>,
pub gitlab_enterprise_events_config: Option<GitLabEventsConfig>,
pub id: Option<String>,
pub ignored_files: Option<Vec<String>>,
pub include_build_logs: Option<String>,
pub included_files: Option<Vec<String>>,
pub name: Option<String>,
pub pubsub_config: Option<PubsubConfig>,
pub repository_event_config: Option<RepositoryEventConfig>,
pub resource_name: Option<String>,
pub service_account: Option<String>,
pub source_to_build: Option<GitRepoSource>,
pub substitutions: Option<HashMap<String, String>>,
pub tags: Option<Vec<String>>,
pub trigger_template: Option<RepoSource>,
pub webhook_config: Option<WebhookConfig>,
}Expand description
Configuration for an automated build in response to source repository changes.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- locations triggers create projects (request|response)
- locations triggers get projects (response)
- locations triggers patch projects (request|response)
- triggers create projects (request|response)
- triggers get projects (response)
- triggers patch projects (request|response)
Fields§
§approval_config: Option<ApprovalConfig>Configuration for manual approval to start a build invocation of this BuildTrigger.
autodetect: Option<bool>Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers.
bitbucket_server_trigger_config: Option<BitbucketServerTriggerConfig>BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received.
build: Option<Build>Contents of the build template.
create_time: Option<DateTime<Utc>>Output only. Time when the trigger was created.
description: Option<String>Human-readable description of this trigger.
disabled: Option<bool>If true, the trigger will never automatically execute a build.
event_type: Option<String>EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set.
filename: Option<String>Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
filter: Option<String>A Common Expression Language string.
git_file_source: Option<GitFileSource>The file source describing the local or remote Build template.
github: Option<GitHubEventsConfig>GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with trigger_template.
gitlab_enterprise_events_config: Option<GitLabEventsConfig>GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received.
id: Option<String>Output only. Unique identifier of the trigger.
ignored_files: Option<Vec<String>>ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for “**”. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
include_build_logs: Option<String>If set to INCLUDE_BUILD_LOGS_WITH_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE_BUILD_LOGS_WITH_STATUS for non GitHub triggers results in INVALID_ARGUMENT error.
included_files: Option<Vec<String>>If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
name: Option<String>User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
pubsub_config: Option<PubsubConfig>PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
repository_event_config: Option<RepositoryEventConfig>The configuration of a trigger that creates a build whenever an event from Repo API is received.
resource_name: Option<String>The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.
service_account: Option<String>The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
source_to_build: Option<GitRepoSource>The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
substitutions: Option<HashMap<String, String>>Substitutions for Build resource. The keys must match the following regular expression: ^_[A-Z0-9_]+$.
Tags for annotation of a BuildTrigger
trigger_template: Option<RepoSource>Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with github.
webhook_config: Option<WebhookConfig>WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger’s webhook URL.
Trait Implementations§
Source§impl Clone for BuildTrigger
impl Clone for BuildTrigger
Source§fn clone(&self) -> BuildTrigger
fn clone(&self) -> BuildTrigger
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildTrigger
impl Debug for BuildTrigger
Source§impl Default for BuildTrigger
impl Default for BuildTrigger
Source§fn default() -> BuildTrigger
fn default() -> BuildTrigger
Source§impl<'de> Deserialize<'de> for BuildTrigger
impl<'de> Deserialize<'de> for BuildTrigger
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for BuildTrigger
impl Serialize for BuildTrigger
impl RequestValue for BuildTrigger
impl ResponseResult for BuildTrigger
Auto Trait Implementations§
impl Freeze for BuildTrigger
impl RefUnwindSafe for BuildTrigger
impl Send for BuildTrigger
impl Sync for BuildTrigger
impl Unpin for BuildTrigger
impl UnwindSafe for BuildTrigger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more