Reference documentation and code samples for the Cloud Build V1 API class Google::Cloud::Build::V1::BuildTrigger.
Configuration for an automated build in response to source repository changes.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#autodetect
def autodetect() -> ::Boolean
-
(::Boolean) — Autodetect build configuration. The following precedence is used (case
insensitive):
- cloudbuild.yaml
- cloudbuild.yml
- cloudbuild.json
- Dockerfile
Currently only available for GitHub App Triggers.
#autodetect=
def autodetect=(value) -> ::Boolean
-
value (::Boolean) — Autodetect build configuration. The following precedence is used (case
insensitive):
- cloudbuild.yaml
- cloudbuild.yml
- cloudbuild.json
- Dockerfile
Currently only available for GitHub App Triggers.
-
(::Boolean) — Autodetect build configuration. The following precedence is used (case
insensitive):
- cloudbuild.yaml
- cloudbuild.yml
- cloudbuild.json
- Dockerfile
Currently only available for GitHub App Triggers.
#build
def build() -> ::Google::Cloud::Build::V1::Build
- (::Google::Cloud::Build::V1::Build) — Contents of the build template.
#build=
def build=(value) -> ::Google::Cloud::Build::V1::Build
- value (::Google::Cloud::Build::V1::Build) — Contents of the build template.
- (::Google::Cloud::Build::V1::Build) — Contents of the build template.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. Time when the trigger was created.
#description
def description() -> ::String
- (::String) — Human-readable description of this trigger.
#description=
def description=(value) -> ::String
- value (::String) — Human-readable description of this trigger.
- (::String) — Human-readable description of this trigger.
#disabled
def disabled() -> ::Boolean
- (::Boolean) — If true, the trigger will never automatically execute a build.
#disabled=
def disabled=(value) -> ::Boolean
- value (::Boolean) — If true, the trigger will never automatically execute a build.
- (::Boolean) — If true, the trigger will never automatically execute a build.
#filename
def filename() -> ::String
- (::String) — Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
#filename=
def filename=(value) -> ::String
- value (::String) — Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
- (::String) — Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
#filter
def filter() -> ::String
- (::String) — Optional. A Common Expression Language string.
#filter=
def filter=(value) -> ::String
- value (::String) — Optional. A Common Expression Language string.
- (::String) — Optional. A Common Expression Language string.
#git_file_source
def git_file_source() -> ::Google::Cloud::Build::V1::GitFileSource
- (::Google::Cloud::Build::V1::GitFileSource) — The file source describing the local or remote Build template.
#git_file_source=
def git_file_source=(value) -> ::Google::Cloud::Build::V1::GitFileSource
- value (::Google::Cloud::Build::V1::GitFileSource) — The file source describing the local or remote Build template.
- (::Google::Cloud::Build::V1::GitFileSource) — The file source describing the local or remote Build template.
#github
def github() -> ::Google::Cloud::Build::V1::GitHubEventsConfig
-
(::Google::Cloud::Build::V1::GitHubEventsConfig) — GitHubEventsConfig describes the configuration of a trigger that creates
a build whenever a GitHub event is received.
Mutually exclusive with
trigger_template
.
#github=
def github=(value) -> ::Google::Cloud::Build::V1::GitHubEventsConfig
-
value (::Google::Cloud::Build::V1::GitHubEventsConfig) — GitHubEventsConfig describes the configuration of a trigger that creates
a build whenever a GitHub event is received.
Mutually exclusive with
trigger_template
.
-
(::Google::Cloud::Build::V1::GitHubEventsConfig) — GitHubEventsConfig describes the configuration of a trigger that creates
a build whenever a GitHub event is received.
Mutually exclusive with
trigger_template
.
#id
def id() -> ::String
- (::String) — Output only. Unique identifier of the trigger.
#ignored_files
def ignored_files() -> ::Array<::String>
-
(::Array<::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.
#ignored_files=
def ignored_files=(value) -> ::Array<::String>
-
value (::Array<::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.
-
(::Array<::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.
#included_files
def included_files() -> ::Array<::String>
-
(::Array<::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.
#included_files=
def included_files=(value) -> ::Array<::String>
-
value (::Array<::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.
-
(::Array<::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
def name() -> ::String
-
(::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.
#name=
def name=(value) -> ::String
-
value (::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.
-
(::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
def pubsub_config() -> ::Google::Cloud::Build::V1::PubsubConfig
- (::Google::Cloud::Build::V1::PubsubConfig) — PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
#pubsub_config=
def pubsub_config=(value) -> ::Google::Cloud::Build::V1::PubsubConfig
- value (::Google::Cloud::Build::V1::PubsubConfig) — PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
- (::Google::Cloud::Build::V1::PubsubConfig) — PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
#repository_event_config
def repository_event_config() -> ::Google::Cloud::Build::V1::RepositoryEventConfig
- (::Google::Cloud::Build::V1::RepositoryEventConfig) — The configuration of a trigger that creates a build whenever an event from Repo API is received.
#repository_event_config=
def repository_event_config=(value) -> ::Google::Cloud::Build::V1::RepositoryEventConfig
- value (::Google::Cloud::Build::V1::RepositoryEventConfig) — The configuration of a trigger that creates a build whenever an event from Repo API is received.
- (::Google::Cloud::Build::V1::RepositoryEventConfig) — The configuration of a trigger that creates a build whenever an event from Repo API is received.
#resource_name
def resource_name() -> ::String
-
(::String) — The
Trigger
name with format:projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service.
#resource_name=
def resource_name=(value) -> ::String
-
value (::String) — The
Trigger
name with format:projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service.
-
(::String) — The
Trigger
name with format:projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service.
#service_account
def service_account() -> ::String
-
(::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}
#service_account=
def service_account=(value) -> ::String
-
value (::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}
-
(::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
def source_to_build() -> ::Google::Cloud::Build::V1::GitRepoSource
- (::Google::Cloud::Build::V1::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.
#source_to_build=
def source_to_build=(value) -> ::Google::Cloud::Build::V1::GitRepoSource
- value (::Google::Cloud::Build::V1::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.
- (::Google::Cloud::Build::V1::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
def substitutions() -> ::Google::Protobuf::Map{::String => ::String}
-
(::Google::Protobuf::Map{::String => ::String}) — Substitutions for Build resource. The keys must match the following
regular expression:
^_[A-Z0-9_]+$
.
#substitutions=
def substitutions=(value) -> ::Google::Protobuf::Map{::String => ::String}
-
value (::Google::Protobuf::Map{::String => ::String}) — Substitutions for Build resource. The keys must match the following
regular expression:
^_[A-Z0-9_]+$
.
-
(::Google::Protobuf::Map{::String => ::String}) — Substitutions for Build resource. The keys must match the following
regular expression:
^_[A-Z0-9_]+$
.
#tags
def tags() -> ::Array<::String>
-
(::Array<::String>) — Tags for annotation of a
BuildTrigger
#tags=
def tags=(value) -> ::Array<::String>
-
value (::Array<::String>) — Tags for annotation of a
BuildTrigger
-
(::Array<::String>) — Tags for annotation of a
BuildTrigger
#trigger_template
def trigger_template() -> ::Google::Cloud::Build::V1::RepoSource
-
(::Google::Cloud::Build::V1::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
.
#trigger_template=
def trigger_template=(value) -> ::Google::Cloud::Build::V1::RepoSource
-
value (::Google::Cloud::Build::V1::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
.
-
(::Google::Cloud::Build::V1::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
def webhook_config() -> ::Google::Cloud::Build::V1::WebhookConfig
- (::Google::Cloud::Build::V1::WebhookConfig) — WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
#webhook_config=
def webhook_config=(value) -> ::Google::Cloud::Build::V1::WebhookConfig
- value (::Google::Cloud::Build::V1::WebhookConfig) — WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
- (::Google::Cloud::Build::V1::WebhookConfig) — WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.