TriggerArgs class

The set of arguments for Trigger. The set of arguments for Trigger.

Constructors

TriggerArgs({Input<ApprovalConfig>? approvalConfig, Input<bool>? autodetect, Input<BitbucketServerTriggerConfig>? bitbucketServerTriggerConfig, Input<BuildCloudbuildV1>? build, Input<String>? description, Input<bool>? disabled, Input<TriggerEventType>? eventType, Input<String>? filename, Input<String>? filter, Input<GitFileSource>? gitFileSource, Input<GitHubEventsConfig>? github, Input<GitLabEventsConfig>? gitlabEnterpriseEventsConfig, Input<List<String>>? ignoredFiles, Input<TriggerIncludeBuildLogs>? includeBuildLogs, Input<List<String>>? includedFiles, Input<String>? location, Input<String>? name, Input<String>? project, required Input<String> projectId, Input<PubsubConfig>? pubsubConfig, Input<RepositoryEventConfig>? repositoryEventConfig, Input<String>? resourceName, Input<String>? serviceAccount, Input<GitRepoSource>? sourceToBuild, Input<Map<String, String>>? substitutions, Input<List<String>>? tags, Input<RepoSource>? triggerTemplate, Input<WebhookConfig>? webhookConfig})
Creates a new TriggerArgs. approvalConfig Configuration for manual approval to start a build invocation of this BuildTrigger. autodetect 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. bitbucketServerTriggerConfig BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. build Contents of the build template. description Human-readable description of this trigger. disabled If true, the trigger will never automatically execute a build. eventType 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 Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). filter A Common Expression Language string. gitFileSource The file source describing the local or remote Build template. github GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with trigger_template. gitlabEnterpriseEventsConfig GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received. ignoredFiles 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. includeBuildLogs 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. includedFiles 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. location Optional. name 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. project Optional. projectId Required. ID of the project for which to configure automatic builds. pubsubConfig PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. repositoryEventConfig The configuration of a trigger that creates a build whenever an event from Repo API is received. resourceName The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service. serviceAccount 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} sourceToBuild 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 Substitutions for Build resource. The keys must match the following regular expression: ^_[A-Z0-9_]+$. tags Tags for annotation of a BuildTrigger triggerTemplate 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. webhookConfig WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
const
TriggerArgs.fromMap(Map<String, dynamic> map)
factory

Properties

approvalConfig → Input<ApprovalConfig>?
Configuration for manual approval to start a build invocation of this BuildTrigger.
final
autodetect → Input<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.
final
bitbucketServerTriggerConfig → Input<BitbucketServerTriggerConfig>?
BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received.
final
build → Input<BuildCloudbuildV1>?
Contents of the build template.
final
description → Input<String>?
Human-readable description of this trigger.
final
disabled → Input<bool>?
If true, the trigger will never automatically execute a build.
final
eventType → Input<TriggerEventType>?
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.
final
filename → Input<String>?
Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
final
filter → Input<String>?
A Common Expression Language string.
final
gitFileSource → Input<GitFileSource>?
The file source describing the local or remote Build template.
final
github → Input<GitHubEventsConfig>?
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with trigger_template.
final
gitlabEnterpriseEventsConfig → Input<GitLabEventsConfig>?
GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received.
final
hashCode → int
The hash code for this object.
no setterinherited
ignoredFiles → Input<List<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.
final
includeBuildLogs → Input<TriggerIncludeBuildLogs>?
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.
final
includedFiles → Input<List<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.
final
location → Input<String>?
final
name → Input<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.
final
project → Input<String>?
final
projectId → Input<String>
Required. ID of the project for which to configure automatic builds.
final
pubsubConfig → Input<PubsubConfig>?
PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
final
repositoryEventConfig → Input<RepositoryEventConfig>?
The configuration of a trigger that creates a build whenever an event from Repo API is received.
final
resourceName → Input<String>?
The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serviceAccount → Input<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}
final
sourceToBuild → Input<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.
final
substitutions → Input<Map<String, String>>?
Substitutions for Build resource. The keys must match the following regular expression: ^_[A-Z0-9_]+$.
final
tags → Input<List<String>>?
Tags for annotation of a BuildTrigger
final
triggerTemplate → Input<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.
final
webhookConfig → Input<WebhookConfig>?
WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited