public sealed class BuildTrigger : IMessage<BuildTrigger>, IEquatable<BuildTrigger>, IDeepCloneable<BuildTrigger>, IBufferMessage, IMessage
Configuration for an automated build in response to source repository changes.
Implements
IMessage<BuildTrigger>, IEquatable<BuildTrigger>, IDeepCloneable<BuildTrigger>, IBufferMessage, IMessageNamespace
Google.Cloud.CloudBuild.V1Assembly
Google.Cloud.CloudBuild.V1.dll
Constructors
BuildTrigger()
public BuildTrigger()
BuildTrigger(BuildTrigger)
public BuildTrigger(BuildTrigger other)
Parameter | |
---|---|
Name | Description |
other | BuildTrigger |
Properties
Autodetect
public bool Autodetect { get; set; }
Autodetect build configuration. The following precedence is used (case insensitive):
- cloudbuild.yaml
- cloudbuild.yml
- cloudbuild.json
- Dockerfile
Currently only available for GitHub App Triggers.
Property Value | |
---|---|
Type | Description |
Boolean |
Build
public Build Build { get; set; }
Contents of the build template.
Property Value | |
---|---|
Type | Description |
Build |
BuildTemplateCase
public BuildTrigger.BuildTemplateOneofCase BuildTemplateCase { get; }
Property Value | |
---|---|
Type | Description |
BuildTrigger.BuildTemplateOneofCase |
BuildTriggerName
public BuildTriggerName BuildTriggerName { get; set; }
BuildTriggerName-typed view over the Name resource name property.
Property Value | |
---|---|
Type | Description |
BuildTriggerName |
CreateTime
public Timestamp CreateTime { get; set; }
Output only. Time when the trigger was created.
Property Value | |
---|---|
Type | Description |
Timestamp |
Description
public string Description { get; set; }
Human-readable description of this trigger.
Property Value | |
---|---|
Type | Description |
String |
Disabled
public bool Disabled { get; set; }
If true, the trigger will never automatically execute a build.
Property Value | |
---|---|
Type | Description |
Boolean |
Filename
public string Filename { get; set; }
Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Property Value | |
---|---|
Type | Description |
String |
Filter
public string Filter { get; set; }
Optional. A Common Expression Language string.
Property Value | |
---|---|
Type | Description |
String |
Github
public GitHubEventsConfig Github { get; set; }
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
Mutually exclusive with trigger_template
.
Property Value | |
---|---|
Type | Description |
GitHubEventsConfig |
Id
public string Id { get; set; }
Output only. Unique identifier of the trigger.
Property Value | |
---|---|
Type | Description |
String |
IgnoredFiles
public RepeatedField<string> IgnoredFiles { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedField<String> |
IncludedFiles
public RepeatedField<string> IncludedFiles { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedField<String> |
Name
public string Name { get; set; }
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.
Property Value | |
---|---|
Type | Description |
String |
PubsubConfig
public PubsubConfig PubsubConfig { get; set; }
PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
Property Value | |
---|---|
Type | Description |
PubsubConfig |
ResourceName
public string ResourceName { get; set; }
The Trigger
name with format:
projects/{project}/locations/{location}/triggers/{trigger}
, where
{trigger} is a unique identifier generated by the service.
Property Value | |
---|---|
Type | Description |
String |
ServiceAccount
public string ServiceAccount { get; set; }
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}
Property Value | |
---|---|
Type | Description |
String |
ServiceAccountAsServiceAccountName
public ServiceAccountName ServiceAccountAsServiceAccountName { get; set; }
ServiceAccountName-typed view over the ServiceAccount resource name property.
Property Value | |
---|---|
Type | Description |
ServiceAccountName |
Substitutions
public MapField<string, string> Substitutions { get; }
Substitutions for Build resource. The keys must match the following
regular expression: ^_[A-Z0-9_]+$
.
Property Value | |
---|---|
Type | Description |
MapField<String, String> |
Tags
public RepeatedField<string> Tags { get; }
Tags for annotation of a BuildTrigger
Property Value | |
---|---|
Type | Description |
RepeatedField<String> |
TriggerTemplate
public RepoSource TriggerTemplate { get; set; }
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
.
Property Value | |
---|---|
Type | Description |
RepoSource |
WebhookConfig
public WebhookConfig WebhookConfig { get; set; }
WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
Property Value | |
---|---|
Type | Description |
WebhookConfig |