REST Resource: projects.triggers

Resource: BuildTrigger

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

JSON representation
{
  "id": string,
  "description": string,
  "triggerTemplate": {
    object(RepoSource)
  },
  "createTime": string,
  "disabled": boolean,
  "substitutions": {
    string: string,
    ...
  },
  "ignoredFiles": [
    string
  ],
  "includedFiles": [
    string
  ],

  // Union field build_template can be only one of the following:
  "build": {
    object(Build)
  },
  "filename": string
  // End of list of possible types for union field build_template.
}
Fields
id

string

Output only. Unique identifier of the trigger.

description

string

Human-readable description of this trigger.

triggerTemplate

object(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.

createTime

string (Timestamp format)

Output only. Time when the trigger was created.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

disabled

boolean

If true, the trigger will never result in a build.

substitutions

map (key: string, value: string)

Substitutions data for Build resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ignoredFiles[]

string

ignoredFiles and includedFiles are file glob matches using http://godoc/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[]

string

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

object(Build)

Contents of the build template.

filename

string

Path, from the source root, to a file whose contents is used for the template.

Methods

create

Creates a new BuildTrigger.

delete

Deletes a BuildTrigger by its project ID and trigger ID.

get

Returns information about a BuildTrigger.

list

Lists existing BuildTriggers.

patch

Updates a BuildTrigger by its project ID and trigger ID.

run

Runs a BuildTrigger at a particular source revision.
¿Te sirvió esta página? Envíanos tu opinión:

Enviar comentarios sobre…