Resource: BuildTrigger
Configuration for an automated build in response to source repository changes.
JSON representation | |
---|---|
{ "id": string, "description": string, "name": string, "tags": [ string ], "triggerTemplate": { object ( |
Fields | ||
---|---|---|
id |
Output only. Unique identifier of the trigger. |
|
description |
Human-readable description of this trigger. |
|
name |
User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:
|
|
tags[] |
Tags for annotation of a |
|
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 |
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with |
|
createTime |
Output only. Time when the trigger was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
|
disabled |
If true, the trigger will never automatically execute a build. |
|
substitutions |
Substitutions for Build resource. The keys must match the following regular expression: An object containing a list of |
|
ignoredFiles[] |
ignoredFiles and includedFiles are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**". If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles 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 ignoredFiles globs, then we do not trigger a build. |
|
includedFiles[] |
If any of the files altered in the commit pass the ignoredFiles filter and includedFiles 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 ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build. |
|
Union field build_template . Template describing the Build request to make when the trigger is matched. build_template can be only one of the following: |
||
build |
Contents of the build template. |
|
filename |
Path, from the source root, to a file whose contents is used for the template. |
GitHubEventsConfig
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
This message is experimental.
JSON representation | |
---|---|
{ "installationId": string, "owner": string, "name": string, // Union field |
Fields | ||
---|---|---|
installationId |
The installationID that emits the GitHub event. |
|
owner |
Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform". |
|
name |
Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
|
Union field event . Filter describing the types of events to trigger a build. Currently supported event types: push, pull_request. event can be only one of the following: |
||
pullRequest |
filter to match changes in pull requests. |
|
push |
filter to match changes in refs like branches, tags. |
PullRequestFilter
PullRequestFilter contains filter properties for matching GitHub Pull Requests.
JSON representation | |
---|---|
{
"commentControl": enum ( |
Fields | |
---|---|
commentControl |
Configure builds to run whether a repository owner or collaborator need to comment |
invertRegex |
If true, branches that do NOT match the git_ref will trigger a build. |
branch |
Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax |
CommentControl
Controls behavior of Pull Request comments.
Enums | |
---|---|
COMMENTS_DISABLED |
Do not require comments on Pull Requests before builds are triggered. |
COMMENTS_ENABLED |
Enforce that repository owners or collaborators must comment on Pull Requests before builds are triggered. |
COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY |
Enforce that repository owners or collaborators must comment on external contributors' Pull Requests before builds are triggered. |
PushFilter
Push contains filter properties for matching GitHub git pushes.
JSON representation | |
---|---|
{ "invertRegex": boolean, // Union field |
Fields | ||
---|---|---|
invertRegex |
When true, only trigger a build if the revision regex does NOT match the git_ref regex. |
|
Union field git_ref . Modified refs to match. A modified refs are the refs modified by a git push operation. git_ref can be only one of the following: |
||
branch |
Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax |
|
tag |
Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax |
Methods |
|
---|---|
|
Creates a new BuildTrigger . |
|
Deletes a BuildTrigger by its project ID and trigger ID. |
|
Returns information about a BuildTrigger . |
|
Lists existing BuildTrigger s. |
|
Updates a BuildTrigger by its project ID and trigger ID. |
|
Runs a BuildTrigger at a particular source revision. |