Class: Google::Cloud::Build::V1::BuildTrigger
- Inherits:
-
Object
- Object
- Google::Cloud::Build::V1::BuildTrigger
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb
Overview
Configuration for an automated build in response to source repository changes.
Defined Under Namespace
Classes: SubstitutionsEntry
Instance Attribute Summary collapse
-
#autodetect ⇒ ::Boolean
Autodetect build configuration.
-
#build ⇒ ::Google::Cloud::Build::V1::Build
Contents of the build template.
-
#create_time ⇒ ::Google::Protobuf::Timestamp
readonly
Output only.
-
#description ⇒ ::String
Human-readable description of this trigger.
-
#disabled ⇒ ::Boolean
If true, the trigger will never automatically execute a build.
-
#filename ⇒ ::String
Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
-
#filter ⇒ ::String
Optional.
-
#git_file_source ⇒ ::Google::Cloud::Build::V1::GitFileSource
The file source describing the local or remote Build template.
-
#github ⇒ ::Google::Cloud::Build::V1::GitHubEventsConfig
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
-
#id ⇒ ::String
readonly
Output only.
-
#ignored_files ⇒ ::Array<::String>
Ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".
-
#included_files ⇒ ::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.
-
#name ⇒ ::String
User-assigned name of the trigger.
-
#pubsub_config ⇒ ::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 ⇒ ::Google::Cloud::Build::V1::RepositoryEventConfig
The configuration of a trigger that creates a build whenever an event from Repo API is received.
-
#resource_name ⇒ ::String
The
Trigger
name with format:projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service. -
#service_account ⇒ ::String
The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
-
#source_to_build ⇒ ::Google::Cloud::Build::V1::GitRepoSource
The repo and ref of the repository from which to build.
-
#substitutions ⇒ ::Google::Protobuf::Map{::String => ::String}
Substitutions for Build resource.
-
#tags ⇒ ::Array<::String>
Tags for annotation of a
BuildTrigger
. -
#trigger_template ⇒ ::Google::Cloud::Build::V1::RepoSource
Template describing the types of source changes to trigger a build.
-
#webhook_config ⇒ ::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.
Instance Attribute Details
#autodetect ⇒ ::Boolean
Returns Autodetect build configuration. The following precedence is used (case insensitive):
- cloudbuild.yaml
- cloudbuild.yml
- cloudbuild.json
- Dockerfile
Currently only available for GitHub App Triggers.
Note: The following fields are mutually exclusive: autodetect
, build
, filename
, git_file_source
. If a field in that set is populated, all other fields in the set will automatically be cleared.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#build ⇒ ::Google::Cloud::Build::V1::Build
Returns Contents of the build template.
Note: The following fields are mutually exclusive: build
, autodetect
, filename
, git_file_source
. If a field in that set is populated, all other fields in the set will automatically be cleared.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#create_time ⇒ ::Google::Protobuf::Timestamp (readonly)
Returns Output only. Time when the trigger was created.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#description ⇒ ::String
Returns Human-readable description of this trigger.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#disabled ⇒ ::Boolean
Returns If true, the trigger will never automatically execute a build.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#filename ⇒ ::String
Returns Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Note: The following fields are mutually exclusive: filename
, autodetect
, build
, git_file_source
. If a field in that set is populated, all other fields in the set will automatically be cleared.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#filter ⇒ ::String
Returns Optional. A Common Expression Language string.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#git_file_source ⇒ ::Google::Cloud::Build::V1::GitFileSource
Returns The file source describing the local or remote Build template.
Note: The following fields are mutually exclusive: git_file_source
, autodetect
, build
, filename
. If a field in that set is populated, all other fields in the set will automatically be cleared.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#github ⇒ ::Google::Cloud::Build::V1::GitHubEventsConfig
Returns GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
Mutually exclusive with trigger_template
.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#id ⇒ ::String (readonly)
Returns Output only. Unique identifier of the trigger.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#ignored_files ⇒ ::Array<::String>
Returns 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.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#included_files ⇒ ::Array<::String>
Returns 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.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#name ⇒ ::String
Returns 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.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#pubsub_config ⇒ ::Google::Cloud::Build::V1::PubsubConfig
Returns PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#repository_event_config ⇒ ::Google::Cloud::Build::V1::RepositoryEventConfig
Returns The configuration of a trigger that creates a build whenever an event from Repo API is received.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#resource_name ⇒ ::String
Returns The Trigger
name with format:
projects/{project}/locations/{location}/triggers/{trigger}
, where
{trigger} is a unique identifier generated by the service.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#service_account ⇒ ::String
Returns The service account used for all user-controlled operations including
UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
If no service account is set and the legacy Cloud Build service account
([PROJECT_NUM]@cloudbuild.gserviceaccount.com
) is the default for the
project then it will be used instead.
Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#source_to_build ⇒ ::Google::Cloud::Build::V1::GitRepoSource
Returns 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.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#substitutions ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns Substitutions for Build resource. The keys must match the following
regular expression: ^_[A-Z0-9_]+$
.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#tags ⇒ ::Array<::String>
Returns Tags for annotation of a BuildTrigger
.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#trigger_template ⇒ ::Google::Cloud::Build::V1::RepoSource
Returns 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
.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#webhook_config ⇒ ::Google::Cloud::Build::V1::WebhookConfig
Returns WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1662 class BuildTrigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class SubstitutionsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |