Show / Hide Table of Contents

Class BuildTrigger

Configuration for an automated build in response to source repository changes.

Inheritance
object
BuildTrigger
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.CloudBuild.v1.Data
Assembly: Google.Apis.CloudBuild.v1.dll
Syntax
public class BuildTrigger : IDirectResponseSchema

Properties

ApprovalConfig

Configuration for manual approval to start a build invocation of this BuildTrigger.

Declaration
[JsonProperty("approvalConfig")]
public virtual ApprovalConfig ApprovalConfig { get; set; }
Property Value
Type Description
ApprovalConfig

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.

Declaration
[JsonProperty("autodetect")]
public virtual bool? Autodetect { get; set; }
Property Value
Type Description
bool?

BitbucketServerTriggerConfig

BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received.

Declaration
[JsonProperty("bitbucketServerTriggerConfig")]
public virtual BitbucketServerTriggerConfig BitbucketServerTriggerConfig { get; set; }
Property Value
Type Description
BitbucketServerTriggerConfig

Build

Contents of the build template.

Declaration
[JsonProperty("build")]
public virtual Build Build { get; set; }
Property Value
Type Description
Build

CreateTime

object representation of CreateTimeRaw.

Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use CreateTimeDateTimeOffset instead.")]
public virtual object CreateTime { get; set; }
Property Value
Type Description
object

CreateTimeDateTimeOffset

DateTimeOffset representation of CreateTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTimeOffset? CreateTimeDateTimeOffset { get; set; }
Property Value
Type Description
DateTimeOffset?

CreateTimeRaw

Output only. Time when the trigger was created.

Declaration
[JsonProperty("createTime")]
public virtual string CreateTimeRaw { get; set; }
Property Value
Type Description
string

Description

Human-readable description of this trigger.

Declaration
[JsonProperty("description")]
public virtual string Description { get; set; }
Property Value
Type Description
string

DeveloperConnectEventConfig

Optional. The configuration of a trigger that creates a build whenever an event from the DeveloperConnect API is received.

Declaration
[JsonProperty("developerConnectEventConfig")]
public virtual DeveloperConnectEventConfig DeveloperConnectEventConfig { get; set; }
Property Value
Type Description
DeveloperConnectEventConfig

Disabled

If true, the trigger will never automatically execute a build.

Declaration
[JsonProperty("disabled")]
public virtual bool? Disabled { get; set; }
Property Value
Type Description
bool?

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

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.

Declaration
[JsonProperty("eventType")]
public virtual string EventType { get; set; }
Property Value
Type Description
string

Filename

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

Declaration
[JsonProperty("filename")]
public virtual string Filename { get; set; }
Property Value
Type Description
string

Filter

A Common Expression Language string.

Declaration
[JsonProperty("filter")]
public virtual string Filter { get; set; }
Property Value
Type Description
string

GitFileSource

The file source describing the local or remote Build template.

Declaration
[JsonProperty("gitFileSource")]
public virtual GitFileSource GitFileSource { get; set; }
Property Value
Type Description
GitFileSource

Github

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with trigger_template.

Declaration
[JsonProperty("github")]
public virtual GitHubEventsConfig Github { get; set; }
Property Value
Type Description
GitHubEventsConfig

GitlabEnterpriseEventsConfig

GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received.

Declaration
[JsonProperty("gitlabEnterpriseEventsConfig")]
public virtual GitLabEventsConfig GitlabEnterpriseEventsConfig { get; set; }
Property Value
Type Description
GitLabEventsConfig

Id

Output only. Unique identifier of the trigger.

Declaration
[JsonProperty("id")]
public virtual string Id { get; set; }
Property Value
Type Description
string

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.

Declaration
[JsonProperty("ignoredFiles")]
public virtual IList<string> IgnoredFiles { get; set; }
Property Value
Type Description
IList<string>

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.

Declaration
[JsonProperty("includeBuildLogs")]
public virtual string IncludeBuildLogs { get; set; }
Property Value
Type Description
string

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.

Declaration
[JsonProperty("includedFiles")]
public virtual IList<string> IncludedFiles { get; set; }
Property Value
Type Description
IList<string>

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.

Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type Description
string

PubsubConfig

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

Declaration
[JsonProperty("pubsubConfig")]
public virtual PubsubConfig PubsubConfig { get; set; }
Property Value
Type Description
PubsubConfig

RepositoryEventConfig

The configuration of a trigger that creates a build whenever an event from Repo API is received.

Declaration
[JsonProperty("repositoryEventConfig")]
public virtual RepositoryEventConfig RepositoryEventConfig { get; set; }
Property Value
Type Description
RepositoryEventConfig

ResourceName

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

Declaration
[JsonProperty("resourceName")]
public virtual string ResourceName { get; set; }
Property Value
Type Description
string

ServiceAccount

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}

Declaration
[JsonProperty("serviceAccount")]
public virtual string ServiceAccount { get; set; }
Property Value
Type Description
string

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.

Declaration
[JsonProperty("sourceToBuild")]
public virtual GitRepoSource SourceToBuild { get; set; }
Property Value
Type Description
GitRepoSource

Substitutions

Substitutions for Build resource. The keys must match the following regular expression: ^_[A-Z0-9_]+$.

Declaration
[JsonProperty("substitutions")]
public virtual IDictionary<string, string> Substitutions { get; set; }
Property Value
Type Description
IDictionary<string, string>

Tags

Tags for annotation of a BuildTrigger

Declaration
[JsonProperty("tags")]
public virtual IList<string> Tags { get; set; }
Property Value
Type Description
IList<string>

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.

Declaration
[JsonProperty("triggerTemplate")]
public virtual RepoSource TriggerTemplate { get; set; }
Property Value
Type Description
RepoSource

WebhookConfig

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

Declaration
[JsonProperty("webhookConfig")]
public virtual WebhookConfig WebhookConfig { get; set; }
Property Value
Type Description
WebhookConfig

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX