Cloud Build V1 API - Class Google::Cloud::Build::V1::BuildTrigger (v0.22.0)

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
Returns
  • (::Boolean) — 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.

#autodetect=

def autodetect=(value) -> ::Boolean
Parameter
  • value (::Boolean) — 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.

Returns
  • (::Boolean) — 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.

#build

def build() -> ::Google::Cloud::Build::V1::Build
Returns

#build=

def build=(value) -> ::Google::Cloud::Build::V1::Build
Parameter
Returns

#create_time

def create_time() -> ::Google::Protobuf::Timestamp
Returns

#description

def description() -> ::String
Returns
  • (::String) — Human-readable description of this trigger.

#description=

def description=(value) -> ::String
Parameter
  • value (::String) — Human-readable description of this trigger.
Returns
  • (::String) — Human-readable description of this trigger.

#disabled

def disabled() -> ::Boolean
Returns
  • (::Boolean) — If true, the trigger will never automatically execute a build.

#disabled=

def disabled=(value) -> ::Boolean
Parameter
  • value (::Boolean) — If true, the trigger will never automatically execute a build.
Returns
  • (::Boolean) — If true, the trigger will never automatically execute a build.

#filename

def filename() -> ::String
Returns
  • (::String) — Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

#filename=

def filename=(value) -> ::String
Parameter
  • value (::String) — Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Returns
  • (::String) — Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

#filter

def filter() -> ::String
Returns
  • (::String) — Optional. A Common Expression Language string.

#filter=

def filter=(value) -> ::String
Parameter
  • value (::String) — Optional. A Common Expression Language string.
Returns
  • (::String) — Optional. A Common Expression Language string.

#git_file_source

def git_file_source() -> ::Google::Cloud::Build::V1::GitFileSource
Returns

#git_file_source=

def git_file_source=(value) -> ::Google::Cloud::Build::V1::GitFileSource
Parameter
Returns

#github

def github() -> ::Google::Cloud::Build::V1::GitHubEventsConfig
Returns

#github=

def github=(value) -> ::Google::Cloud::Build::V1::GitHubEventsConfig
Parameter
Returns

#id

def id() -> ::String
Returns
  • (::String) — Output only. Unique identifier of the trigger.

#ignored_files

def ignored_files() -> ::Array<::String>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns

#pubsub_config=

def pubsub_config=(value) -> ::Google::Cloud::Build::V1::PubsubConfig
Parameter
Returns

#repository_event_config

def repository_event_config() -> ::Google::Cloud::Build::V1::RepositoryEventConfig
Returns

#repository_event_config=

def repository_event_config=(value) -> ::Google::Cloud::Build::V1::RepositoryEventConfig
Parameter
Returns

#resource_name

def resource_name() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.
Returns
  • (::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
Returns
  • (::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
Parameter
  • 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}
Returns
  • (::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
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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}
Returns
  • (::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}
Parameter
  • value (::Google::Protobuf::Map{::String => ::String}) — Substitutions for Build resource. The keys must match the following regular expression: ^_[A-Z0-9_]+$.
Returns
  • (::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>
Returns
  • (::Array<::String>) — Tags for annotation of a BuildTrigger

#tags=

def tags=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Tags for annotation of a BuildTrigger
Returns
  • (::Array<::String>) — Tags for annotation of a BuildTrigger

#trigger_template

def trigger_template() -> ::Google::Cloud::Build::V1::RepoSource
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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
Returns

#webhook_config=

def webhook_config=(value) -> ::Google::Cloud::Build::V1::WebhookConfig
Parameter
Returns