• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudbuild_v1.html">Cloud Build API</a> . <a href="cloudbuild_v1.projects.html">projects</a> . <a href="cloudbuild_v1.projects.triggers.html">triggers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#create">create(projectId, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new `BuildTrigger`.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(projectId, triggerId, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a `BuildTrigger` by its project ID and trigger ID.</p>
83<p class="toc_element">
84  <code><a href="#get">get(projectId, triggerId, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns information about a `BuildTrigger`.</p>
86<p class="toc_element">
87  <code><a href="#list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists existing `BuildTrigger`s.</p>
89<p class="toc_element">
90  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93  <code><a href="#patch">patch(projectId, triggerId, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates a `BuildTrigger` by its project ID and trigger ID.</p>
95<p class="toc_element">
96  <code><a href="#run">run(projectId, triggerId, body, x__xgafv=None)</a></code></p>
97<p class="firstline">Runs a `BuildTrigger` at a particular source revision.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="create">create(projectId, body, x__xgafv=None)</code>
101  <pre>Creates a new `BuildTrigger`.
102
103This API is experimental.
104
105Args:
106  projectId: string, ID of the project for which to configure automatic builds. (required)
107  body: object, The request body. (required)
108    The object takes the form of:
109
110{ # Configuration for an automated build in response to source repository
111    # changes.
112  "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
113      # a build whenever a GitHub event is received.
114      # build whenever a GitHub event is received.
115      #
116      # This message is experimental.
117    "name": "A String", # Name of the repository.
118    "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
119        # Requests.
120      "commentControl": "A String", # Whether to block builds on a "/gcbrun" comment from a repository owner or
121          # collaborator.
122      "branch": "A String", # Regex of branches to match.
123          #
124          # The syntax of the regular expressions accepted is the syntax accepted by
125          # RE2 and described at https://github.com/google/re2/wiki/Syntax
126    },
127    "owner": "A String", # Owner of the repository.
128    "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
129      "tag": "A String", # Regexes of tags to match.
130          #
131          # The syntax of the regular expressions accepted is the syntax accepted by
132          # RE2 and described at https://github.com/google/re2/wiki/Syntax
133      "branch": "A String", # Regexes of branches to match.
134          #
135          # The syntax of the regular expressions accepted is the syntax accepted by
136          # RE2 and described at https://github.com/google/re2/wiki/Syntax
137    },
138    "installationId": "A String", # The installationID that emmits the GitHub event.
139    "checkSuite": { # A CheckSuiteFilter is a filter that indicates that we should build on all # Output only. Indicates that a build was generated from a check suite
140        # event.
141        # check suite events.
142    },
143  },
144  "description": "A String", # Human-readable description of this trigger.
145  "tags": [ # Tags for annotation of a `BuildTrigger`
146    "A String",
147  ],
148  "ignoredFiles": [ # ignored_files and included_files are file glob matches using
149      # http://godoc/pkg/path/filepath#Match extended with support for "**".
150      #
151      # If ignored_files and changed files are both empty, then they are
152      # not used to determine whether or not to trigger a build.
153      #
154      # If ignored_files is not empty, then we ignore any files that match
155      # any of the ignored_file globs. If the change has no files that are
156      # outside of the ignored_files globs, then we do not trigger a build.
157    "A String",
158  ],
159  "filename": "A String", # Path, from the source root, to a file whose contents is used for the
160      # template.
161  "createTime": "A String", # Output only. Time when the trigger was created.
162  "substitutions": { # Substitutions data for Build resource.
163    "a_key": "A String",
164  },
165  "disabled": True or False, # If true, the trigger will never result in a build.
166  "build": { # A build resource in the Cloud Build API. # Contents of the build template.
167      #
168      # At a high level, a `Build` describes where to find source code, how to build
169      # it (for example, the builder image to run on the source), and where to store
170      # the built artifacts.
171      #
172      # Fields can include the following variables, which will be expanded when the
173      # build is created:
174      #
175      # - $PROJECT_ID: the project ID of the build.
176      # - $BUILD_ID: the autogenerated ID of the build.
177      # - $REPO_NAME: the source repository name specified by RepoSource.
178      # - $BRANCH_NAME: the branch name specified by RepoSource.
179      # - $TAG_NAME: the tag name specified by RepoSource.
180      # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
181      #   resolved from the specified branch or tag.
182      # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
183    "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
184      "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
185          # corresponding to build step indices.
186          #
187          # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
188          # can produce this output by writing to `$BUILDER_OUTPUT/output`.
189          # Only the first 4KB of data is stored.
190        "A String",
191      ],
192      "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
193        "endTime": "A String", # End of time span.
194        "startTime": "A String", # Start of time span.
195      },
196      "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
197      "images": [ # Container images that were built as a part of the build.
198        { # An image built by the pipeline.
199          "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
200            "endTime": "A String", # End of time span.
201            "startTime": "A String", # Start of time span.
202          },
203          "name": "A String", # Name used to push the container image to Google Container Registry, as
204              # presented to `docker push`.
205          "digest": "A String", # Docker Registry 2.0 digest.
206        },
207      ],
208      "buildStepImages": [ # List of build step digests, in the order corresponding to build step
209          # indices.
210        "A String",
211      ],
212      "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
213    },
214    "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
215        # some source was used for this build.
216      "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
217          # revisions resolved.
218        "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
219            # project ID requesting the build is assumed.
220        "commitSha": "A String", # Explicit commit SHA to build.
221        "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
222            # assumed.
223        "tagName": "A String", # Name of the tag to build.
224        "branchName": "A String", # Name of the branch to build.
225        "dir": "A String", # Directory, relative to the source root, in which to run the build.
226            #
227            # This must be a relative path. If a step's `dir` is specified and is an
228            # absolute path, this value is ignored for that step's execution.
229      },
230      "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
231          # the original source integrity was maintained in the build. Note that
232          # `FileHashes` will only be populated if `BuildOptions` has requested a
233          # `SourceProvenanceHash`.
234          #
235          # The keys to this map are file paths used as build source and the values
236          # contain the hash values for those files.
237          #
238          # If the build source came in a single package such as a gzipped tarfile
239          # (`.tar.gz`), the `FileHash` will be for the single path to that file.
240        "a_key": { # Container message for hashes of byte content of files, used in
241            # SourceProvenance messages to verify integrity of source input to the build.
242          "fileHash": [ # Collection of file hashes.
243            { # Container message for hash values.
244              "type": "A String", # The type of hash that was performed.
245              "value": "A String", # The hash value.
246            },
247          ],
248        },
249      },
250      "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
251          # generations resolved.
252        "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
253            # omitted, the latest generation will be used.
254        "object": "A String", # Google Cloud Storage object containing the source.
255            #
256            # This object must be a gzipped archive file (`.tar.gz`) containing source to
257            # build.
258        "bucket": "A String", # Google Cloud Storage bucket containing the source (see
259            # [Bucket Name
260            # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
261      },
262    },
263    "images": [ # A list of images to be pushed upon the successful completion of all build
264        # steps.
265        #
266        # The images are pushed using the builder service account's credentials.
267        #
268        # The digests of the pushed images will be stored in the `Build` resource's
269        # results field.
270        #
271        # If any of the images fail to be pushed, the build status is marked
272        # `FAILURE`.
273      "A String",
274    ],
275    "id": "A String", # Output only. Unique identifier of the build.
276    "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
277        # successful completion of all build steps.
278        # successful completion of all build steps.
279      "images": [ # A list of images to be pushed upon the successful completion of all build
280          # steps.
281          #
282          # The images will be pushed using the builder service account's credentials.
283          #
284          # The digests of the pushed images will be stored in the Build resource's
285          # results field.
286          #
287          # If any of the images fail to be pushed, the build is marked FAILURE.
288        "A String",
289      ],
290      "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
291          # completion of all build steps.
292          #
293          # Files in the workspace matching specified paths globs will be uploaded to
294          # the specified Cloud Storage location using the builder service account's
295          # credentials.
296          #
297          # The location and generation of the uploaded objects will be stored in the
298          # Build resource's results field.
299          #
300          # If any objects fail to be pushed, the build is marked FAILURE.
301          # completion of all build steps.
302        "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
303          "endTime": "A String", # End of time span.
304          "startTime": "A String", # Start of time span.
305        },
306        "paths": [ # Path globs used to match files in the build's workspace.
307          "A String",
308        ],
309        "location": "A String", # Cloud Storage bucket and optional object path, in the form
310            # "gs://bucket/path/to/somewhere/". (see [Bucket Name
311            # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
312            #
313            # Files in the workspace matching any path pattern will be uploaded to
314            # Cloud Storage with this location as a prefix.
315      },
316    },
317    "projectId": "A String", # Output only. ID of the project.
318    "substitutions": { # Substitutions data for `Build` resource.
319      "a_key": "A String",
320    },
321    "source": { # Location of the source in a supported storage service. # The location of the source files to build.
322      "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
323          # Repository.
324        "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
325            # project ID requesting the build is assumed.
326        "commitSha": "A String", # Explicit commit SHA to build.
327        "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
328            # assumed.
329        "tagName": "A String", # Name of the tag to build.
330        "branchName": "A String", # Name of the branch to build.
331        "dir": "A String", # Directory, relative to the source root, in which to run the build.
332            #
333            # This must be a relative path. If a step's `dir` is specified and is an
334            # absolute path, this value is ignored for that step's execution.
335      },
336      "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
337        "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
338            # omitted, the latest generation will be used.
339        "object": "A String", # Google Cloud Storage object containing the source.
340            #
341            # This object must be a gzipped archive file (`.tar.gz`) containing source to
342            # build.
343        "bucket": "A String", # Google Cloud Storage bucket containing the source (see
344            # [Bucket Name
345            # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
346      },
347    },
348    "status": "A String", # Output only. Status of the build.
349    "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
350      "A String",
351    ],
352    "statusDetail": "A String", # Output only. Customer-readable message about the current status.
353    "startTime": "A String", # Output only. Time at which execution of the build was started.
354    "timing": { # Output only. Stores timing information for phases of the build. Valid keys
355        # are:
356        #
357        # * BUILD: time to execute all build steps
358        # * PUSH: time to push all specified images.
359        # * FETCHSOURCE: time to fetch source.
360        #
361        # If the build does not specify source or images,
362        # these keys will not be included.
363      "a_key": { # Start and end times for a build execution phase.
364        "endTime": "A String", # End of time span.
365        "startTime": "A String", # Start of time span.
366      },
367    },
368    "createTime": "A String", # Output only. Time at which the request to create the build was received.
369    "finishTime": "A String", # Output only. Time at which execution of the build was finished.
370        #
371        # The difference between finish_time and start_time is the duration of the
372        # build's execution.
373    "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
374        # was triggered automatically.
375    "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
376      { # Pairs a set of secret environment variables containing encrypted
377          # values with the Cloud KMS key to use to decrypt the value.
378        "secretEnv": { # Map of environment variable name to its encrypted value.
379            #
380            # Secret environment variables must be unique across all of a build's
381            # secrets, and must be used by at least one build step. Values can be at most
382            # 64 KB in size. There can be at most 100 secret values across all of a
383            # build's secrets.
384          "a_key": "A String",
385        },
386        "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
387      },
388    ],
389    "steps": [ # Required. The operations to be performed on the workspace.
390      { # A step in the build pipeline.
391        "status": "A String", # Output only. Status of the build step. At this time, build step status is
392            # only updated on build completion; step status is not updated in real-time
393            # as the build progresses.
394        "args": [ # A list of arguments that will be presented to the step when it is started.
395            #
396            # If the image used to run the step's container has an entrypoint, the `args`
397            # are used as arguments to that entrypoint. If the image does not define
398            # an entrypoint, the first element in args is used as the entrypoint,
399            # and the remainder will be used as arguments.
400          "A String",
401        ],
402        "env": [ # A list of environment variable definitions to be used when running a step.
403            #
404            # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
405            # being given the value "VALUE".
406          "A String",
407        ],
408        "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
409            # This build step will not start until all the build steps in `wait_for`
410            # have completed successfully. If `wait_for` is empty, this build step will
411            # start when all previous build steps in the `Build.Steps` list have
412            # completed successfully.
413          "A String",
414        ],
415        "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
416            # time limit and will be allowed to continue to run until either it completes
417            # or the build itself times out.
418        "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
419            # Management Service crypto key. These values must be specified in the
420            # build's `Secret`.
421          "A String",
422        ],
423        "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
424            # If unset, the image's default entrypoint is used.
425        "volumes": [ # List of volumes to mount into the build step.
426            #
427            # Each volume is created as an empty volume prior to execution of the
428            # build step. Upon completion of the build, volumes and their contents are
429            # discarded.
430            #
431            # Using a named volume in only one step is not valid as it is indicative
432            # of a build request with an incorrect configuration.
433          { # Volume describes a Docker container volume which is mounted into build steps
434              # in order to persist files across build step execution.
435            "path": "A String", # Path at which to mount the volume.
436                #
437                # Paths must be absolute and cannot conflict with other volume paths on the
438                # same build step or with certain reserved volume paths.
439            "name": "A String", # Name of the volume to mount.
440                #
441                # Volume names must be unique per build step and must be valid names for
442                # Docker volumes. Each named volume must be used by at least two build steps.
443          },
444        ],
445        "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
446          "endTime": "A String", # End of time span.
447          "startTime": "A String", # Start of time span.
448        },
449        "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
450            # builder image only.
451          "endTime": "A String", # End of time span.
452          "startTime": "A String", # Start of time span.
453        },
454        "id": "A String", # Unique identifier for this build step, used in `wait_for` to
455            # reference this build step as a dependency.
456        "dir": "A String", # Working directory to use when running this step's container.
457            #
458            # If this value is a relative path, it is relative to the build's working
459            # directory. If this value is absolute, it may be outside the build's working
460            # directory, in which case the contents of the path may not be persisted
461            # across build step executions, unless a `volume` for that path is specified.
462            #
463            # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
464            # which specifies an absolute path, the `RepoSource` `dir` is ignored for
465            # the step's execution.
466        "name": "A String", # Required. The name of the container image that will run this particular
467            # build step.
468            #
469            # If the image is available in the host's Docker daemon's cache, it
470            # will be run directly. If not, the host will attempt to pull the image
471            # first, using the builder service account's credentials if necessary.
472            #
473            # The Docker daemon's cache will already have the latest versions of all of
474            # the officially supported build steps
475            # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
476            # The Docker daemon will also have cached many of the layers for some popular
477            # images, like "ubuntu", "debian", but they will be refreshed at the time you
478            # attempt to use them.
479            #
480            # If you built an image in a previous build step, it will be stored in the
481            # host's Docker daemon's cache and is available to use as the name for a
482            # later build step.
483      },
484    ],
485    "timeout": "A String", # Amount of time that this build should be allowed to run, to second
486        # granularity. If this amount of time elapses, work on the build will cease
487        # and the build status will be `TIMEOUT`.
488        #
489        # Default time is ten minutes.
490    "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
491        # [Bucket Name
492        # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
493        # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
494    "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
495      "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
496          # checks.
497      "logging": "A String", # Option to specify the logging mode, which determines where the logs are
498          # stored.
499      "volumes": [ # Global list of volumes to mount for ALL build steps
500          #
501          # Each volume is created as an empty volume prior to starting the build
502          # process. Upon completion of the build, volumes and their contents are
503          # discarded. Global volume names and paths cannot conflict with the volumes
504          # defined a build step.
505          #
506          # Using a global volume in a build with only one step is not valid as
507          # it is indicative of a build request with an incorrect configuration.
508        { # Volume describes a Docker container volume which is mounted into build steps
509            # in order to persist files across build step execution.
510          "path": "A String", # Path at which to mount the volume.
511              #
512              # Paths must be absolute and cannot conflict with other volume paths on the
513              # same build step or with certain reserved volume paths.
514          "name": "A String", # Name of the volume to mount.
515              #
516              # Volume names must be unique per build step and must be valid names for
517              # Docker volumes. Each named volume must be used by at least two build steps.
518        },
519      ],
520      "workerPool": "A String", # Option to specify a `WorkerPool` for the build. User specifies the pool
521          # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
522          # This is an experimental field.
523      "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
524          # Storage.
525      "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
526        "A String",
527      ],
528      "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
529          # Key Management Service crypto key. These values must be specified in the
530          # build's `Secret`. These variables will be available to all build steps
531          # in this build.
532        "A String",
533      ],
534      "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
535          # "disk free"; some of the space will be used by the operating system and
536          # build utilities. Also note that this is the minimum disk size that will be
537          # allocated for the build -- the build may run with a larger disk than
538          # requested. At present, the maximum disk size is 1000GB; builds that request
539          # more than the maximum are rejected with an error.
540      "env": [ # A list of global environment variable definitions that will exist for all
541          # build steps in this build. If a variable is defined in both globally and in
542          # a build step, the variable will use the build step value.
543          #
544          # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
545          # being given the value "VALUE".
546        "A String",
547      ],
548      "requestedVerifyOption": "A String", # Requested verifiability options.
549      "machineType": "A String", # Compute Engine machine type on which to run the build.
550    },
551    "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
552  },
553  "includedFiles": [ # If any of the files altered in the commit pass the ignored_files
554      # filter and included_files is empty, then as far as this filter is
555      # concerned, we should trigger the build.
556      #
557      # If any of the files altered in the commit pass the ignored_files
558      # filter and included_files is not empty, then we make sure that at
559      # least one of those files matches a included_files glob. If not,
560      # then we do not trigger a build.
561    "A String",
562  ],
563  "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
564      #
565      # Branch and tag names in trigger templates are interpreted as regular
566      # expressions. Any branch or tag change that matches that regular expression
567      # will trigger a build.
568    "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
569        # project ID requesting the build is assumed.
570    "commitSha": "A String", # Explicit commit SHA to build.
571    "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
572        # assumed.
573    "tagName": "A String", # Name of the tag to build.
574    "branchName": "A String", # Name of the branch to build.
575    "dir": "A String", # Directory, relative to the source root, in which to run the build.
576        #
577        # This must be a relative path. If a step's `dir` is specified and is an
578        # absolute path, this value is ignored for that step's execution.
579  },
580  "id": "A String", # Output only. Unique identifier of the trigger.
581}
582
583  x__xgafv: string, V1 error format.
584    Allowed values
585      1 - v1 error format
586      2 - v2 error format
587
588Returns:
589  An object of the form:
590
591    { # Configuration for an automated build in response to source repository
592      # changes.
593    "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
594        # a build whenever a GitHub event is received.
595        # build whenever a GitHub event is received.
596        #
597        # This message is experimental.
598      "name": "A String", # Name of the repository.
599      "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
600          # Requests.
601        "commentControl": "A String", # Whether to block builds on a "/gcbrun" comment from a repository owner or
602            # collaborator.
603        "branch": "A String", # Regex of branches to match.
604            #
605            # The syntax of the regular expressions accepted is the syntax accepted by
606            # RE2 and described at https://github.com/google/re2/wiki/Syntax
607      },
608      "owner": "A String", # Owner of the repository.
609      "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
610        "tag": "A String", # Regexes of tags to match.
611            #
612            # The syntax of the regular expressions accepted is the syntax accepted by
613            # RE2 and described at https://github.com/google/re2/wiki/Syntax
614        "branch": "A String", # Regexes of branches to match.
615            #
616            # The syntax of the regular expressions accepted is the syntax accepted by
617            # RE2 and described at https://github.com/google/re2/wiki/Syntax
618      },
619      "installationId": "A String", # The installationID that emmits the GitHub event.
620      "checkSuite": { # A CheckSuiteFilter is a filter that indicates that we should build on all # Output only. Indicates that a build was generated from a check suite
621          # event.
622          # check suite events.
623      },
624    },
625    "description": "A String", # Human-readable description of this trigger.
626    "tags": [ # Tags for annotation of a `BuildTrigger`
627      "A String",
628    ],
629    "ignoredFiles": [ # ignored_files and included_files are file glob matches using
630        # http://godoc/pkg/path/filepath#Match extended with support for "**".
631        #
632        # If ignored_files and changed files are both empty, then they are
633        # not used to determine whether or not to trigger a build.
634        #
635        # If ignored_files is not empty, then we ignore any files that match
636        # any of the ignored_file globs. If the change has no files that are
637        # outside of the ignored_files globs, then we do not trigger a build.
638      "A String",
639    ],
640    "filename": "A String", # Path, from the source root, to a file whose contents is used for the
641        # template.
642    "createTime": "A String", # Output only. Time when the trigger was created.
643    "substitutions": { # Substitutions data for Build resource.
644      "a_key": "A String",
645    },
646    "disabled": True or False, # If true, the trigger will never result in a build.
647    "build": { # A build resource in the Cloud Build API. # Contents of the build template.
648        #
649        # At a high level, a `Build` describes where to find source code, how to build
650        # it (for example, the builder image to run on the source), and where to store
651        # the built artifacts.
652        #
653        # Fields can include the following variables, which will be expanded when the
654        # build is created:
655        #
656        # - $PROJECT_ID: the project ID of the build.
657        # - $BUILD_ID: the autogenerated ID of the build.
658        # - $REPO_NAME: the source repository name specified by RepoSource.
659        # - $BRANCH_NAME: the branch name specified by RepoSource.
660        # - $TAG_NAME: the tag name specified by RepoSource.
661        # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
662        #   resolved from the specified branch or tag.
663        # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
664      "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
665        "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
666            # corresponding to build step indices.
667            #
668            # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
669            # can produce this output by writing to `$BUILDER_OUTPUT/output`.
670            # Only the first 4KB of data is stored.
671          "A String",
672        ],
673        "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
674          "endTime": "A String", # End of time span.
675          "startTime": "A String", # Start of time span.
676        },
677        "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
678        "images": [ # Container images that were built as a part of the build.
679          { # An image built by the pipeline.
680            "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
681              "endTime": "A String", # End of time span.
682              "startTime": "A String", # Start of time span.
683            },
684            "name": "A String", # Name used to push the container image to Google Container Registry, as
685                # presented to `docker push`.
686            "digest": "A String", # Docker Registry 2.0 digest.
687          },
688        ],
689        "buildStepImages": [ # List of build step digests, in the order corresponding to build step
690            # indices.
691          "A String",
692        ],
693        "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
694      },
695      "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
696          # some source was used for this build.
697        "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
698            # revisions resolved.
699          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
700              # project ID requesting the build is assumed.
701          "commitSha": "A String", # Explicit commit SHA to build.
702          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
703              # assumed.
704          "tagName": "A String", # Name of the tag to build.
705          "branchName": "A String", # Name of the branch to build.
706          "dir": "A String", # Directory, relative to the source root, in which to run the build.
707              #
708              # This must be a relative path. If a step's `dir` is specified and is an
709              # absolute path, this value is ignored for that step's execution.
710        },
711        "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
712            # the original source integrity was maintained in the build. Note that
713            # `FileHashes` will only be populated if `BuildOptions` has requested a
714            # `SourceProvenanceHash`.
715            #
716            # The keys to this map are file paths used as build source and the values
717            # contain the hash values for those files.
718            #
719            # If the build source came in a single package such as a gzipped tarfile
720            # (`.tar.gz`), the `FileHash` will be for the single path to that file.
721          "a_key": { # Container message for hashes of byte content of files, used in
722              # SourceProvenance messages to verify integrity of source input to the build.
723            "fileHash": [ # Collection of file hashes.
724              { # Container message for hash values.
725                "type": "A String", # The type of hash that was performed.
726                "value": "A String", # The hash value.
727              },
728            ],
729          },
730        },
731        "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
732            # generations resolved.
733          "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
734              # omitted, the latest generation will be used.
735          "object": "A String", # Google Cloud Storage object containing the source.
736              #
737              # This object must be a gzipped archive file (`.tar.gz`) containing source to
738              # build.
739          "bucket": "A String", # Google Cloud Storage bucket containing the source (see
740              # [Bucket Name
741              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
742        },
743      },
744      "images": [ # A list of images to be pushed upon the successful completion of all build
745          # steps.
746          #
747          # The images are pushed using the builder service account's credentials.
748          #
749          # The digests of the pushed images will be stored in the `Build` resource's
750          # results field.
751          #
752          # If any of the images fail to be pushed, the build status is marked
753          # `FAILURE`.
754        "A String",
755      ],
756      "id": "A String", # Output only. Unique identifier of the build.
757      "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
758          # successful completion of all build steps.
759          # successful completion of all build steps.
760        "images": [ # A list of images to be pushed upon the successful completion of all build
761            # steps.
762            #
763            # The images will be pushed using the builder service account's credentials.
764            #
765            # The digests of the pushed images will be stored in the Build resource's
766            # results field.
767            #
768            # If any of the images fail to be pushed, the build is marked FAILURE.
769          "A String",
770        ],
771        "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
772            # completion of all build steps.
773            #
774            # Files in the workspace matching specified paths globs will be uploaded to
775            # the specified Cloud Storage location using the builder service account's
776            # credentials.
777            #
778            # The location and generation of the uploaded objects will be stored in the
779            # Build resource's results field.
780            #
781            # If any objects fail to be pushed, the build is marked FAILURE.
782            # completion of all build steps.
783          "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
784            "endTime": "A String", # End of time span.
785            "startTime": "A String", # Start of time span.
786          },
787          "paths": [ # Path globs used to match files in the build's workspace.
788            "A String",
789          ],
790          "location": "A String", # Cloud Storage bucket and optional object path, in the form
791              # "gs://bucket/path/to/somewhere/". (see [Bucket Name
792              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
793              #
794              # Files in the workspace matching any path pattern will be uploaded to
795              # Cloud Storage with this location as a prefix.
796        },
797      },
798      "projectId": "A String", # Output only. ID of the project.
799      "substitutions": { # Substitutions data for `Build` resource.
800        "a_key": "A String",
801      },
802      "source": { # Location of the source in a supported storage service. # The location of the source files to build.
803        "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
804            # Repository.
805          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
806              # project ID requesting the build is assumed.
807          "commitSha": "A String", # Explicit commit SHA to build.
808          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
809              # assumed.
810          "tagName": "A String", # Name of the tag to build.
811          "branchName": "A String", # Name of the branch to build.
812          "dir": "A String", # Directory, relative to the source root, in which to run the build.
813              #
814              # This must be a relative path. If a step's `dir` is specified and is an
815              # absolute path, this value is ignored for that step's execution.
816        },
817        "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
818          "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
819              # omitted, the latest generation will be used.
820          "object": "A String", # Google Cloud Storage object containing the source.
821              #
822              # This object must be a gzipped archive file (`.tar.gz`) containing source to
823              # build.
824          "bucket": "A String", # Google Cloud Storage bucket containing the source (see
825              # [Bucket Name
826              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
827        },
828      },
829      "status": "A String", # Output only. Status of the build.
830      "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
831        "A String",
832      ],
833      "statusDetail": "A String", # Output only. Customer-readable message about the current status.
834      "startTime": "A String", # Output only. Time at which execution of the build was started.
835      "timing": { # Output only. Stores timing information for phases of the build. Valid keys
836          # are:
837          #
838          # * BUILD: time to execute all build steps
839          # * PUSH: time to push all specified images.
840          # * FETCHSOURCE: time to fetch source.
841          #
842          # If the build does not specify source or images,
843          # these keys will not be included.
844        "a_key": { # Start and end times for a build execution phase.
845          "endTime": "A String", # End of time span.
846          "startTime": "A String", # Start of time span.
847        },
848      },
849      "createTime": "A String", # Output only. Time at which the request to create the build was received.
850      "finishTime": "A String", # Output only. Time at which execution of the build was finished.
851          #
852          # The difference between finish_time and start_time is the duration of the
853          # build's execution.
854      "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
855          # was triggered automatically.
856      "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
857        { # Pairs a set of secret environment variables containing encrypted
858            # values with the Cloud KMS key to use to decrypt the value.
859          "secretEnv": { # Map of environment variable name to its encrypted value.
860              #
861              # Secret environment variables must be unique across all of a build's
862              # secrets, and must be used by at least one build step. Values can be at most
863              # 64 KB in size. There can be at most 100 secret values across all of a
864              # build's secrets.
865            "a_key": "A String",
866          },
867          "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
868        },
869      ],
870      "steps": [ # Required. The operations to be performed on the workspace.
871        { # A step in the build pipeline.
872          "status": "A String", # Output only. Status of the build step. At this time, build step status is
873              # only updated on build completion; step status is not updated in real-time
874              # as the build progresses.
875          "args": [ # A list of arguments that will be presented to the step when it is started.
876              #
877              # If the image used to run the step's container has an entrypoint, the `args`
878              # are used as arguments to that entrypoint. If the image does not define
879              # an entrypoint, the first element in args is used as the entrypoint,
880              # and the remainder will be used as arguments.
881            "A String",
882          ],
883          "env": [ # A list of environment variable definitions to be used when running a step.
884              #
885              # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
886              # being given the value "VALUE".
887            "A String",
888          ],
889          "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
890              # This build step will not start until all the build steps in `wait_for`
891              # have completed successfully. If `wait_for` is empty, this build step will
892              # start when all previous build steps in the `Build.Steps` list have
893              # completed successfully.
894            "A String",
895          ],
896          "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
897              # time limit and will be allowed to continue to run until either it completes
898              # or the build itself times out.
899          "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
900              # Management Service crypto key. These values must be specified in the
901              # build's `Secret`.
902            "A String",
903          ],
904          "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
905              # If unset, the image's default entrypoint is used.
906          "volumes": [ # List of volumes to mount into the build step.
907              #
908              # Each volume is created as an empty volume prior to execution of the
909              # build step. Upon completion of the build, volumes and their contents are
910              # discarded.
911              #
912              # Using a named volume in only one step is not valid as it is indicative
913              # of a build request with an incorrect configuration.
914            { # Volume describes a Docker container volume which is mounted into build steps
915                # in order to persist files across build step execution.
916              "path": "A String", # Path at which to mount the volume.
917                  #
918                  # Paths must be absolute and cannot conflict with other volume paths on the
919                  # same build step or with certain reserved volume paths.
920              "name": "A String", # Name of the volume to mount.
921                  #
922                  # Volume names must be unique per build step and must be valid names for
923                  # Docker volumes. Each named volume must be used by at least two build steps.
924            },
925          ],
926          "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
927            "endTime": "A String", # End of time span.
928            "startTime": "A String", # Start of time span.
929          },
930          "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
931              # builder image only.
932            "endTime": "A String", # End of time span.
933            "startTime": "A String", # Start of time span.
934          },
935          "id": "A String", # Unique identifier for this build step, used in `wait_for` to
936              # reference this build step as a dependency.
937          "dir": "A String", # Working directory to use when running this step's container.
938              #
939              # If this value is a relative path, it is relative to the build's working
940              # directory. If this value is absolute, it may be outside the build's working
941              # directory, in which case the contents of the path may not be persisted
942              # across build step executions, unless a `volume` for that path is specified.
943              #
944              # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
945              # which specifies an absolute path, the `RepoSource` `dir` is ignored for
946              # the step's execution.
947          "name": "A String", # Required. The name of the container image that will run this particular
948              # build step.
949              #
950              # If the image is available in the host's Docker daemon's cache, it
951              # will be run directly. If not, the host will attempt to pull the image
952              # first, using the builder service account's credentials if necessary.
953              #
954              # The Docker daemon's cache will already have the latest versions of all of
955              # the officially supported build steps
956              # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
957              # The Docker daemon will also have cached many of the layers for some popular
958              # images, like "ubuntu", "debian", but they will be refreshed at the time you
959              # attempt to use them.
960              #
961              # If you built an image in a previous build step, it will be stored in the
962              # host's Docker daemon's cache and is available to use as the name for a
963              # later build step.
964        },
965      ],
966      "timeout": "A String", # Amount of time that this build should be allowed to run, to second
967          # granularity. If this amount of time elapses, work on the build will cease
968          # and the build status will be `TIMEOUT`.
969          #
970          # Default time is ten minutes.
971      "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
972          # [Bucket Name
973          # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
974          # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
975      "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
976        "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
977            # checks.
978        "logging": "A String", # Option to specify the logging mode, which determines where the logs are
979            # stored.
980        "volumes": [ # Global list of volumes to mount for ALL build steps
981            #
982            # Each volume is created as an empty volume prior to starting the build
983            # process. Upon completion of the build, volumes and their contents are
984            # discarded. Global volume names and paths cannot conflict with the volumes
985            # defined a build step.
986            #
987            # Using a global volume in a build with only one step is not valid as
988            # it is indicative of a build request with an incorrect configuration.
989          { # Volume describes a Docker container volume which is mounted into build steps
990              # in order to persist files across build step execution.
991            "path": "A String", # Path at which to mount the volume.
992                #
993                # Paths must be absolute and cannot conflict with other volume paths on the
994                # same build step or with certain reserved volume paths.
995            "name": "A String", # Name of the volume to mount.
996                #
997                # Volume names must be unique per build step and must be valid names for
998                # Docker volumes. Each named volume must be used by at least two build steps.
999          },
1000        ],
1001        "workerPool": "A String", # Option to specify a `WorkerPool` for the build. User specifies the pool
1002            # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
1003            # This is an experimental field.
1004        "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
1005            # Storage.
1006        "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1007          "A String",
1008        ],
1009        "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
1010            # Key Management Service crypto key. These values must be specified in the
1011            # build's `Secret`. These variables will be available to all build steps
1012            # in this build.
1013          "A String",
1014        ],
1015        "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
1016            # "disk free"; some of the space will be used by the operating system and
1017            # build utilities. Also note that this is the minimum disk size that will be
1018            # allocated for the build -- the build may run with a larger disk than
1019            # requested. At present, the maximum disk size is 1000GB; builds that request
1020            # more than the maximum are rejected with an error.
1021        "env": [ # A list of global environment variable definitions that will exist for all
1022            # build steps in this build. If a variable is defined in both globally and in
1023            # a build step, the variable will use the build step value.
1024            #
1025            # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1026            # being given the value "VALUE".
1027          "A String",
1028        ],
1029        "requestedVerifyOption": "A String", # Requested verifiability options.
1030        "machineType": "A String", # Compute Engine machine type on which to run the build.
1031      },
1032      "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
1033    },
1034    "includedFiles": [ # If any of the files altered in the commit pass the ignored_files
1035        # filter and included_files is empty, then as far as this filter is
1036        # concerned, we should trigger the build.
1037        #
1038        # If any of the files altered in the commit pass the ignored_files
1039        # filter and included_files is not empty, then we make sure that at
1040        # least one of those files matches a included_files glob. If not,
1041        # then we do not trigger a build.
1042      "A String",
1043    ],
1044    "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
1045        #
1046        # Branch and tag names in trigger templates are interpreted as regular
1047        # expressions. Any branch or tag change that matches that regular expression
1048        # will trigger a build.
1049      "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1050          # project ID requesting the build is assumed.
1051      "commitSha": "A String", # Explicit commit SHA to build.
1052      "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
1053          # assumed.
1054      "tagName": "A String", # Name of the tag to build.
1055      "branchName": "A String", # Name of the branch to build.
1056      "dir": "A String", # Directory, relative to the source root, in which to run the build.
1057          #
1058          # This must be a relative path. If a step's `dir` is specified and is an
1059          # absolute path, this value is ignored for that step's execution.
1060    },
1061    "id": "A String", # Output only. Unique identifier of the trigger.
1062  }</pre>
1063</div>
1064
1065<div class="method">
1066    <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code>
1067  <pre>Deletes a `BuildTrigger` by its project ID and trigger ID.
1068
1069This API is experimental.
1070
1071Args:
1072  projectId: string, ID of the project that owns the trigger. (required)
1073  triggerId: string, ID of the `BuildTrigger` to delete. (required)
1074  x__xgafv: string, V1 error format.
1075    Allowed values
1076      1 - v1 error format
1077      2 - v2 error format
1078
1079Returns:
1080  An object of the form:
1081
1082    { # A generic empty message that you can re-use to avoid defining duplicated
1083      # empty messages in your APIs. A typical example is to use it as the request
1084      # or the response type of an API method. For instance:
1085      #
1086      #     service Foo {
1087      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1088      #     }
1089      #
1090      # The JSON representation for `Empty` is empty JSON object `{}`.
1091  }</pre>
1092</div>
1093
1094<div class="method">
1095    <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code>
1096  <pre>Returns information about a `BuildTrigger`.
1097
1098This API is experimental.
1099
1100Args:
1101  projectId: string, ID of the project that owns the trigger. (required)
1102  triggerId: string, ID of the `BuildTrigger` to get. (required)
1103  x__xgafv: string, V1 error format.
1104    Allowed values
1105      1 - v1 error format
1106      2 - v2 error format
1107
1108Returns:
1109  An object of the form:
1110
1111    { # Configuration for an automated build in response to source repository
1112      # changes.
1113    "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
1114        # a build whenever a GitHub event is received.
1115        # build whenever a GitHub event is received.
1116        #
1117        # This message is experimental.
1118      "name": "A String", # Name of the repository.
1119      "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
1120          # Requests.
1121        "commentControl": "A String", # Whether to block builds on a "/gcbrun" comment from a repository owner or
1122            # collaborator.
1123        "branch": "A String", # Regex of branches to match.
1124            #
1125            # The syntax of the regular expressions accepted is the syntax accepted by
1126            # RE2 and described at https://github.com/google/re2/wiki/Syntax
1127      },
1128      "owner": "A String", # Owner of the repository.
1129      "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1130        "tag": "A String", # Regexes of tags to match.
1131            #
1132            # The syntax of the regular expressions accepted is the syntax accepted by
1133            # RE2 and described at https://github.com/google/re2/wiki/Syntax
1134        "branch": "A String", # Regexes of branches to match.
1135            #
1136            # The syntax of the regular expressions accepted is the syntax accepted by
1137            # RE2 and described at https://github.com/google/re2/wiki/Syntax
1138      },
1139      "installationId": "A String", # The installationID that emmits the GitHub event.
1140      "checkSuite": { # A CheckSuiteFilter is a filter that indicates that we should build on all # Output only. Indicates that a build was generated from a check suite
1141          # event.
1142          # check suite events.
1143      },
1144    },
1145    "description": "A String", # Human-readable description of this trigger.
1146    "tags": [ # Tags for annotation of a `BuildTrigger`
1147      "A String",
1148    ],
1149    "ignoredFiles": [ # ignored_files and included_files are file glob matches using
1150        # http://godoc/pkg/path/filepath#Match extended with support for "**".
1151        #
1152        # If ignored_files and changed files are both empty, then they are
1153        # not used to determine whether or not to trigger a build.
1154        #
1155        # If ignored_files is not empty, then we ignore any files that match
1156        # any of the ignored_file globs. If the change has no files that are
1157        # outside of the ignored_files globs, then we do not trigger a build.
1158      "A String",
1159    ],
1160    "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1161        # template.
1162    "createTime": "A String", # Output only. Time when the trigger was created.
1163    "substitutions": { # Substitutions data for Build resource.
1164      "a_key": "A String",
1165    },
1166    "disabled": True or False, # If true, the trigger will never result in a build.
1167    "build": { # A build resource in the Cloud Build API. # Contents of the build template.
1168        #
1169        # At a high level, a `Build` describes where to find source code, how to build
1170        # it (for example, the builder image to run on the source), and where to store
1171        # the built artifacts.
1172        #
1173        # Fields can include the following variables, which will be expanded when the
1174        # build is created:
1175        #
1176        # - $PROJECT_ID: the project ID of the build.
1177        # - $BUILD_ID: the autogenerated ID of the build.
1178        # - $REPO_NAME: the source repository name specified by RepoSource.
1179        # - $BRANCH_NAME: the branch name specified by RepoSource.
1180        # - $TAG_NAME: the tag name specified by RepoSource.
1181        # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1182        #   resolved from the specified branch or tag.
1183        # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1184      "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
1185        "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
1186            # corresponding to build step indices.
1187            #
1188            # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1189            # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1190            # Only the first 4KB of data is stored.
1191          "A String",
1192        ],
1193        "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1194          "endTime": "A String", # End of time span.
1195          "startTime": "A String", # Start of time span.
1196        },
1197        "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
1198        "images": [ # Container images that were built as a part of the build.
1199          { # An image built by the pipeline.
1200            "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1201              "endTime": "A String", # End of time span.
1202              "startTime": "A String", # Start of time span.
1203            },
1204            "name": "A String", # Name used to push the container image to Google Container Registry, as
1205                # presented to `docker push`.
1206            "digest": "A String", # Docker Registry 2.0 digest.
1207          },
1208        ],
1209        "buildStepImages": [ # List of build step digests, in the order corresponding to build step
1210            # indices.
1211          "A String",
1212        ],
1213        "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1214      },
1215      "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1216          # some source was used for this build.
1217        "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
1218            # revisions resolved.
1219          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1220              # project ID requesting the build is assumed.
1221          "commitSha": "A String", # Explicit commit SHA to build.
1222          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
1223              # assumed.
1224          "tagName": "A String", # Name of the tag to build.
1225          "branchName": "A String", # Name of the branch to build.
1226          "dir": "A String", # Directory, relative to the source root, in which to run the build.
1227              #
1228              # This must be a relative path. If a step's `dir` is specified and is an
1229              # absolute path, this value is ignored for that step's execution.
1230        },
1231        "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
1232            # the original source integrity was maintained in the build. Note that
1233            # `FileHashes` will only be populated if `BuildOptions` has requested a
1234            # `SourceProvenanceHash`.
1235            #
1236            # The keys to this map are file paths used as build source and the values
1237            # contain the hash values for those files.
1238            #
1239            # If the build source came in a single package such as a gzipped tarfile
1240            # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1241          "a_key": { # Container message for hashes of byte content of files, used in
1242              # SourceProvenance messages to verify integrity of source input to the build.
1243            "fileHash": [ # Collection of file hashes.
1244              { # Container message for hash values.
1245                "type": "A String", # The type of hash that was performed.
1246                "value": "A String", # The hash value.
1247              },
1248            ],
1249          },
1250        },
1251        "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
1252            # generations resolved.
1253          "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1254              # omitted, the latest generation will be used.
1255          "object": "A String", # Google Cloud Storage object containing the source.
1256              #
1257              # This object must be a gzipped archive file (`.tar.gz`) containing source to
1258              # build.
1259          "bucket": "A String", # Google Cloud Storage bucket containing the source (see
1260              # [Bucket Name
1261              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1262        },
1263      },
1264      "images": [ # A list of images to be pushed upon the successful completion of all build
1265          # steps.
1266          #
1267          # The images are pushed using the builder service account's credentials.
1268          #
1269          # The digests of the pushed images will be stored in the `Build` resource's
1270          # results field.
1271          #
1272          # If any of the images fail to be pushed, the build status is marked
1273          # `FAILURE`.
1274        "A String",
1275      ],
1276      "id": "A String", # Output only. Unique identifier of the build.
1277      "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1278          # successful completion of all build steps.
1279          # successful completion of all build steps.
1280        "images": [ # A list of images to be pushed upon the successful completion of all build
1281            # steps.
1282            #
1283            # The images will be pushed using the builder service account's credentials.
1284            #
1285            # The digests of the pushed images will be stored in the Build resource's
1286            # results field.
1287            #
1288            # If any of the images fail to be pushed, the build is marked FAILURE.
1289          "A String",
1290        ],
1291        "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1292            # completion of all build steps.
1293            #
1294            # Files in the workspace matching specified paths globs will be uploaded to
1295            # the specified Cloud Storage location using the builder service account's
1296            # credentials.
1297            #
1298            # The location and generation of the uploaded objects will be stored in the
1299            # Build resource's results field.
1300            #
1301            # If any objects fail to be pushed, the build is marked FAILURE.
1302            # completion of all build steps.
1303          "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1304            "endTime": "A String", # End of time span.
1305            "startTime": "A String", # Start of time span.
1306          },
1307          "paths": [ # Path globs used to match files in the build's workspace.
1308            "A String",
1309          ],
1310          "location": "A String", # Cloud Storage bucket and optional object path, in the form
1311              # "gs://bucket/path/to/somewhere/". (see [Bucket Name
1312              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1313              #
1314              # Files in the workspace matching any path pattern will be uploaded to
1315              # Cloud Storage with this location as a prefix.
1316        },
1317      },
1318      "projectId": "A String", # Output only. ID of the project.
1319      "substitutions": { # Substitutions data for `Build` resource.
1320        "a_key": "A String",
1321      },
1322      "source": { # Location of the source in a supported storage service. # The location of the source files to build.
1323        "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
1324            # Repository.
1325          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1326              # project ID requesting the build is assumed.
1327          "commitSha": "A String", # Explicit commit SHA to build.
1328          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
1329              # assumed.
1330          "tagName": "A String", # Name of the tag to build.
1331          "branchName": "A String", # Name of the branch to build.
1332          "dir": "A String", # Directory, relative to the source root, in which to run the build.
1333              #
1334              # This must be a relative path. If a step's `dir` is specified and is an
1335              # absolute path, this value is ignored for that step's execution.
1336        },
1337        "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1338          "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1339              # omitted, the latest generation will be used.
1340          "object": "A String", # Google Cloud Storage object containing the source.
1341              #
1342              # This object must be a gzipped archive file (`.tar.gz`) containing source to
1343              # build.
1344          "bucket": "A String", # Google Cloud Storage bucket containing the source (see
1345              # [Bucket Name
1346              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1347        },
1348      },
1349      "status": "A String", # Output only. Status of the build.
1350      "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
1351        "A String",
1352      ],
1353      "statusDetail": "A String", # Output only. Customer-readable message about the current status.
1354      "startTime": "A String", # Output only. Time at which execution of the build was started.
1355      "timing": { # Output only. Stores timing information for phases of the build. Valid keys
1356          # are:
1357          #
1358          # * BUILD: time to execute all build steps
1359          # * PUSH: time to push all specified images.
1360          # * FETCHSOURCE: time to fetch source.
1361          #
1362          # If the build does not specify source or images,
1363          # these keys will not be included.
1364        "a_key": { # Start and end times for a build execution phase.
1365          "endTime": "A String", # End of time span.
1366          "startTime": "A String", # Start of time span.
1367        },
1368      },
1369      "createTime": "A String", # Output only. Time at which the request to create the build was received.
1370      "finishTime": "A String", # Output only. Time at which execution of the build was finished.
1371          #
1372          # The difference between finish_time and start_time is the duration of the
1373          # build's execution.
1374      "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1375          # was triggered automatically.
1376      "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
1377        { # Pairs a set of secret environment variables containing encrypted
1378            # values with the Cloud KMS key to use to decrypt the value.
1379          "secretEnv": { # Map of environment variable name to its encrypted value.
1380              #
1381              # Secret environment variables must be unique across all of a build's
1382              # secrets, and must be used by at least one build step. Values can be at most
1383              # 64 KB in size. There can be at most 100 secret values across all of a
1384              # build's secrets.
1385            "a_key": "A String",
1386          },
1387          "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
1388        },
1389      ],
1390      "steps": [ # Required. The operations to be performed on the workspace.
1391        { # A step in the build pipeline.
1392          "status": "A String", # Output only. Status of the build step. At this time, build step status is
1393              # only updated on build completion; step status is not updated in real-time
1394              # as the build progresses.
1395          "args": [ # A list of arguments that will be presented to the step when it is started.
1396              #
1397              # If the image used to run the step's container has an entrypoint, the `args`
1398              # are used as arguments to that entrypoint. If the image does not define
1399              # an entrypoint, the first element in args is used as the entrypoint,
1400              # and the remainder will be used as arguments.
1401            "A String",
1402          ],
1403          "env": [ # A list of environment variable definitions to be used when running a step.
1404              #
1405              # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1406              # being given the value "VALUE".
1407            "A String",
1408          ],
1409          "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1410              # This build step will not start until all the build steps in `wait_for`
1411              # have completed successfully. If `wait_for` is empty, this build step will
1412              # start when all previous build steps in the `Build.Steps` list have
1413              # completed successfully.
1414            "A String",
1415          ],
1416          "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
1417              # time limit and will be allowed to continue to run until either it completes
1418              # or the build itself times out.
1419          "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
1420              # Management Service crypto key. These values must be specified in the
1421              # build's `Secret`.
1422            "A String",
1423          ],
1424          "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
1425              # If unset, the image's default entrypoint is used.
1426          "volumes": [ # List of volumes to mount into the build step.
1427              #
1428              # Each volume is created as an empty volume prior to execution of the
1429              # build step. Upon completion of the build, volumes and their contents are
1430              # discarded.
1431              #
1432              # Using a named volume in only one step is not valid as it is indicative
1433              # of a build request with an incorrect configuration.
1434            { # Volume describes a Docker container volume which is mounted into build steps
1435                # in order to persist files across build step execution.
1436              "path": "A String", # Path at which to mount the volume.
1437                  #
1438                  # Paths must be absolute and cannot conflict with other volume paths on the
1439                  # same build step or with certain reserved volume paths.
1440              "name": "A String", # Name of the volume to mount.
1441                  #
1442                  # Volume names must be unique per build step and must be valid names for
1443                  # Docker volumes. Each named volume must be used by at least two build steps.
1444            },
1445          ],
1446          "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1447            "endTime": "A String", # End of time span.
1448            "startTime": "A String", # Start of time span.
1449          },
1450          "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
1451              # builder image only.
1452            "endTime": "A String", # End of time span.
1453            "startTime": "A String", # Start of time span.
1454          },
1455          "id": "A String", # Unique identifier for this build step, used in `wait_for` to
1456              # reference this build step as a dependency.
1457          "dir": "A String", # Working directory to use when running this step's container.
1458              #
1459              # If this value is a relative path, it is relative to the build's working
1460              # directory. If this value is absolute, it may be outside the build's working
1461              # directory, in which case the contents of the path may not be persisted
1462              # across build step executions, unless a `volume` for that path is specified.
1463              #
1464              # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1465              # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1466              # the step's execution.
1467          "name": "A String", # Required. The name of the container image that will run this particular
1468              # build step.
1469              #
1470              # If the image is available in the host's Docker daemon's cache, it
1471              # will be run directly. If not, the host will attempt to pull the image
1472              # first, using the builder service account's credentials if necessary.
1473              #
1474              # The Docker daemon's cache will already have the latest versions of all of
1475              # the officially supported build steps
1476              # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1477              # The Docker daemon will also have cached many of the layers for some popular
1478              # images, like "ubuntu", "debian", but they will be refreshed at the time you
1479              # attempt to use them.
1480              #
1481              # If you built an image in a previous build step, it will be stored in the
1482              # host's Docker daemon's cache and is available to use as the name for a
1483              # later build step.
1484        },
1485      ],
1486      "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1487          # granularity. If this amount of time elapses, work on the build will cease
1488          # and the build status will be `TIMEOUT`.
1489          #
1490          # Default time is ten minutes.
1491      "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1492          # [Bucket Name
1493          # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1494          # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1495      "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1496        "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
1497            # checks.
1498        "logging": "A String", # Option to specify the logging mode, which determines where the logs are
1499            # stored.
1500        "volumes": [ # Global list of volumes to mount for ALL build steps
1501            #
1502            # Each volume is created as an empty volume prior to starting the build
1503            # process. Upon completion of the build, volumes and their contents are
1504            # discarded. Global volume names and paths cannot conflict with the volumes
1505            # defined a build step.
1506            #
1507            # Using a global volume in a build with only one step is not valid as
1508            # it is indicative of a build request with an incorrect configuration.
1509          { # Volume describes a Docker container volume which is mounted into build steps
1510              # in order to persist files across build step execution.
1511            "path": "A String", # Path at which to mount the volume.
1512                #
1513                # Paths must be absolute and cannot conflict with other volume paths on the
1514                # same build step or with certain reserved volume paths.
1515            "name": "A String", # Name of the volume to mount.
1516                #
1517                # Volume names must be unique per build step and must be valid names for
1518                # Docker volumes. Each named volume must be used by at least two build steps.
1519          },
1520        ],
1521        "workerPool": "A String", # Option to specify a `WorkerPool` for the build. User specifies the pool
1522            # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
1523            # This is an experimental field.
1524        "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
1525            # Storage.
1526        "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1527          "A String",
1528        ],
1529        "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
1530            # Key Management Service crypto key. These values must be specified in the
1531            # build's `Secret`. These variables will be available to all build steps
1532            # in this build.
1533          "A String",
1534        ],
1535        "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
1536            # "disk free"; some of the space will be used by the operating system and
1537            # build utilities. Also note that this is the minimum disk size that will be
1538            # allocated for the build -- the build may run with a larger disk than
1539            # requested. At present, the maximum disk size is 1000GB; builds that request
1540            # more than the maximum are rejected with an error.
1541        "env": [ # A list of global environment variable definitions that will exist for all
1542            # build steps in this build. If a variable is defined in both globally and in
1543            # a build step, the variable will use the build step value.
1544            #
1545            # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1546            # being given the value "VALUE".
1547          "A String",
1548        ],
1549        "requestedVerifyOption": "A String", # Requested verifiability options.
1550        "machineType": "A String", # Compute Engine machine type on which to run the build.
1551      },
1552      "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
1553    },
1554    "includedFiles": [ # If any of the files altered in the commit pass the ignored_files
1555        # filter and included_files is empty, then as far as this filter is
1556        # concerned, we should trigger the build.
1557        #
1558        # If any of the files altered in the commit pass the ignored_files
1559        # filter and included_files is not empty, then we make sure that at
1560        # least one of those files matches a included_files glob. If not,
1561        # then we do not trigger a build.
1562      "A String",
1563    ],
1564    "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
1565        #
1566        # Branch and tag names in trigger templates are interpreted as regular
1567        # expressions. Any branch or tag change that matches that regular expression
1568        # will trigger a build.
1569      "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1570          # project ID requesting the build is assumed.
1571      "commitSha": "A String", # Explicit commit SHA to build.
1572      "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
1573          # assumed.
1574      "tagName": "A String", # Name of the tag to build.
1575      "branchName": "A String", # Name of the branch to build.
1576      "dir": "A String", # Directory, relative to the source root, in which to run the build.
1577          #
1578          # This must be a relative path. If a step's `dir` is specified and is an
1579          # absolute path, this value is ignored for that step's execution.
1580    },
1581    "id": "A String", # Output only. Unique identifier of the trigger.
1582  }</pre>
1583</div>
1584
1585<div class="method">
1586    <code class="details" id="list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None)</code>
1587  <pre>Lists existing `BuildTrigger`s.
1588
1589This API is experimental.
1590
1591Args:
1592  projectId: string, ID of the project for which to list BuildTriggers. (required)
1593  pageSize: integer, Number of results to return in the list.
1594  pageToken: string, Token to provide to skip to a particular spot in the list.
1595  x__xgafv: string, V1 error format.
1596    Allowed values
1597      1 - v1 error format
1598      2 - v2 error format
1599
1600Returns:
1601  An object of the form:
1602
1603    { # Response containing existing `BuildTriggers`.
1604    "nextPageToken": "A String", # Token to receive the next page of results.
1605    "triggers": [ # `BuildTriggers` for the project, sorted by `create_time` descending.
1606      { # Configuration for an automated build in response to source repository
1607          # changes.
1608        "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
1609            # a build whenever a GitHub event is received.
1610            # build whenever a GitHub event is received.
1611            #
1612            # This message is experimental.
1613          "name": "A String", # Name of the repository.
1614          "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
1615              # Requests.
1616            "commentControl": "A String", # Whether to block builds on a "/gcbrun" comment from a repository owner or
1617                # collaborator.
1618            "branch": "A String", # Regex of branches to match.
1619                #
1620                # The syntax of the regular expressions accepted is the syntax accepted by
1621                # RE2 and described at https://github.com/google/re2/wiki/Syntax
1622          },
1623          "owner": "A String", # Owner of the repository.
1624          "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1625            "tag": "A String", # Regexes of tags to match.
1626                #
1627                # The syntax of the regular expressions accepted is the syntax accepted by
1628                # RE2 and described at https://github.com/google/re2/wiki/Syntax
1629            "branch": "A String", # Regexes of branches to match.
1630                #
1631                # The syntax of the regular expressions accepted is the syntax accepted by
1632                # RE2 and described at https://github.com/google/re2/wiki/Syntax
1633          },
1634          "installationId": "A String", # The installationID that emmits the GitHub event.
1635          "checkSuite": { # A CheckSuiteFilter is a filter that indicates that we should build on all # Output only. Indicates that a build was generated from a check suite
1636              # event.
1637              # check suite events.
1638          },
1639        },
1640        "description": "A String", # Human-readable description of this trigger.
1641        "tags": [ # Tags for annotation of a `BuildTrigger`
1642          "A String",
1643        ],
1644        "ignoredFiles": [ # ignored_files and included_files are file glob matches using
1645            # http://godoc/pkg/path/filepath#Match extended with support for "**".
1646            #
1647            # If ignored_files and changed files are both empty, then they are
1648            # not used to determine whether or not to trigger a build.
1649            #
1650            # If ignored_files is not empty, then we ignore any files that match
1651            # any of the ignored_file globs. If the change has no files that are
1652            # outside of the ignored_files globs, then we do not trigger a build.
1653          "A String",
1654        ],
1655        "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1656            # template.
1657        "createTime": "A String", # Output only. Time when the trigger was created.
1658        "substitutions": { # Substitutions data for Build resource.
1659          "a_key": "A String",
1660        },
1661        "disabled": True or False, # If true, the trigger will never result in a build.
1662        "build": { # A build resource in the Cloud Build API. # Contents of the build template.
1663            #
1664            # At a high level, a `Build` describes where to find source code, how to build
1665            # it (for example, the builder image to run on the source), and where to store
1666            # the built artifacts.
1667            #
1668            # Fields can include the following variables, which will be expanded when the
1669            # build is created:
1670            #
1671            # - $PROJECT_ID: the project ID of the build.
1672            # - $BUILD_ID: the autogenerated ID of the build.
1673            # - $REPO_NAME: the source repository name specified by RepoSource.
1674            # - $BRANCH_NAME: the branch name specified by RepoSource.
1675            # - $TAG_NAME: the tag name specified by RepoSource.
1676            # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1677            #   resolved from the specified branch or tag.
1678            # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1679          "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
1680            "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
1681                # corresponding to build step indices.
1682                #
1683                # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1684                # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1685                # Only the first 4KB of data is stored.
1686              "A String",
1687            ],
1688            "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1689              "endTime": "A String", # End of time span.
1690              "startTime": "A String", # Start of time span.
1691            },
1692            "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
1693            "images": [ # Container images that were built as a part of the build.
1694              { # An image built by the pipeline.
1695                "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1696                  "endTime": "A String", # End of time span.
1697                  "startTime": "A String", # Start of time span.
1698                },
1699                "name": "A String", # Name used to push the container image to Google Container Registry, as
1700                    # presented to `docker push`.
1701                "digest": "A String", # Docker Registry 2.0 digest.
1702              },
1703            ],
1704            "buildStepImages": [ # List of build step digests, in the order corresponding to build step
1705                # indices.
1706              "A String",
1707            ],
1708            "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1709          },
1710          "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1711              # some source was used for this build.
1712            "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
1713                # revisions resolved.
1714              "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1715                  # project ID requesting the build is assumed.
1716              "commitSha": "A String", # Explicit commit SHA to build.
1717              "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
1718                  # assumed.
1719              "tagName": "A String", # Name of the tag to build.
1720              "branchName": "A String", # Name of the branch to build.
1721              "dir": "A String", # Directory, relative to the source root, in which to run the build.
1722                  #
1723                  # This must be a relative path. If a step's `dir` is specified and is an
1724                  # absolute path, this value is ignored for that step's execution.
1725            },
1726            "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
1727                # the original source integrity was maintained in the build. Note that
1728                # `FileHashes` will only be populated if `BuildOptions` has requested a
1729                # `SourceProvenanceHash`.
1730                #
1731                # The keys to this map are file paths used as build source and the values
1732                # contain the hash values for those files.
1733                #
1734                # If the build source came in a single package such as a gzipped tarfile
1735                # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1736              "a_key": { # Container message for hashes of byte content of files, used in
1737                  # SourceProvenance messages to verify integrity of source input to the build.
1738                "fileHash": [ # Collection of file hashes.
1739                  { # Container message for hash values.
1740                    "type": "A String", # The type of hash that was performed.
1741                    "value": "A String", # The hash value.
1742                  },
1743                ],
1744              },
1745            },
1746            "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
1747                # generations resolved.
1748              "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1749                  # omitted, the latest generation will be used.
1750              "object": "A String", # Google Cloud Storage object containing the source.
1751                  #
1752                  # This object must be a gzipped archive file (`.tar.gz`) containing source to
1753                  # build.
1754              "bucket": "A String", # Google Cloud Storage bucket containing the source (see
1755                  # [Bucket Name
1756                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1757            },
1758          },
1759          "images": [ # A list of images to be pushed upon the successful completion of all build
1760              # steps.
1761              #
1762              # The images are pushed using the builder service account's credentials.
1763              #
1764              # The digests of the pushed images will be stored in the `Build` resource's
1765              # results field.
1766              #
1767              # If any of the images fail to be pushed, the build status is marked
1768              # `FAILURE`.
1769            "A String",
1770          ],
1771          "id": "A String", # Output only. Unique identifier of the build.
1772          "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1773              # successful completion of all build steps.
1774              # successful completion of all build steps.
1775            "images": [ # A list of images to be pushed upon the successful completion of all build
1776                # steps.
1777                #
1778                # The images will be pushed using the builder service account's credentials.
1779                #
1780                # The digests of the pushed images will be stored in the Build resource's
1781                # results field.
1782                #
1783                # If any of the images fail to be pushed, the build is marked FAILURE.
1784              "A String",
1785            ],
1786            "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1787                # completion of all build steps.
1788                #
1789                # Files in the workspace matching specified paths globs will be uploaded to
1790                # the specified Cloud Storage location using the builder service account's
1791                # credentials.
1792                #
1793                # The location and generation of the uploaded objects will be stored in the
1794                # Build resource's results field.
1795                #
1796                # If any objects fail to be pushed, the build is marked FAILURE.
1797                # completion of all build steps.
1798              "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1799                "endTime": "A String", # End of time span.
1800                "startTime": "A String", # Start of time span.
1801              },
1802              "paths": [ # Path globs used to match files in the build's workspace.
1803                "A String",
1804              ],
1805              "location": "A String", # Cloud Storage bucket and optional object path, in the form
1806                  # "gs://bucket/path/to/somewhere/". (see [Bucket Name
1807                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1808                  #
1809                  # Files in the workspace matching any path pattern will be uploaded to
1810                  # Cloud Storage with this location as a prefix.
1811            },
1812          },
1813          "projectId": "A String", # Output only. ID of the project.
1814          "substitutions": { # Substitutions data for `Build` resource.
1815            "a_key": "A String",
1816          },
1817          "source": { # Location of the source in a supported storage service. # The location of the source files to build.
1818            "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
1819                # Repository.
1820              "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1821                  # project ID requesting the build is assumed.
1822              "commitSha": "A String", # Explicit commit SHA to build.
1823              "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
1824                  # assumed.
1825              "tagName": "A String", # Name of the tag to build.
1826              "branchName": "A String", # Name of the branch to build.
1827              "dir": "A String", # Directory, relative to the source root, in which to run the build.
1828                  #
1829                  # This must be a relative path. If a step's `dir` is specified and is an
1830                  # absolute path, this value is ignored for that step's execution.
1831            },
1832            "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1833              "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1834                  # omitted, the latest generation will be used.
1835              "object": "A String", # Google Cloud Storage object containing the source.
1836                  #
1837                  # This object must be a gzipped archive file (`.tar.gz`) containing source to
1838                  # build.
1839              "bucket": "A String", # Google Cloud Storage bucket containing the source (see
1840                  # [Bucket Name
1841                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1842            },
1843          },
1844          "status": "A String", # Output only. Status of the build.
1845          "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
1846            "A String",
1847          ],
1848          "statusDetail": "A String", # Output only. Customer-readable message about the current status.
1849          "startTime": "A String", # Output only. Time at which execution of the build was started.
1850          "timing": { # Output only. Stores timing information for phases of the build. Valid keys
1851              # are:
1852              #
1853              # * BUILD: time to execute all build steps
1854              # * PUSH: time to push all specified images.
1855              # * FETCHSOURCE: time to fetch source.
1856              #
1857              # If the build does not specify source or images,
1858              # these keys will not be included.
1859            "a_key": { # Start and end times for a build execution phase.
1860              "endTime": "A String", # End of time span.
1861              "startTime": "A String", # Start of time span.
1862            },
1863          },
1864          "createTime": "A String", # Output only. Time at which the request to create the build was received.
1865          "finishTime": "A String", # Output only. Time at which execution of the build was finished.
1866              #
1867              # The difference between finish_time and start_time is the duration of the
1868              # build's execution.
1869          "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1870              # was triggered automatically.
1871          "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
1872            { # Pairs a set of secret environment variables containing encrypted
1873                # values with the Cloud KMS key to use to decrypt the value.
1874              "secretEnv": { # Map of environment variable name to its encrypted value.
1875                  #
1876                  # Secret environment variables must be unique across all of a build's
1877                  # secrets, and must be used by at least one build step. Values can be at most
1878                  # 64 KB in size. There can be at most 100 secret values across all of a
1879                  # build's secrets.
1880                "a_key": "A String",
1881              },
1882              "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
1883            },
1884          ],
1885          "steps": [ # Required. The operations to be performed on the workspace.
1886            { # A step in the build pipeline.
1887              "status": "A String", # Output only. Status of the build step. At this time, build step status is
1888                  # only updated on build completion; step status is not updated in real-time
1889                  # as the build progresses.
1890              "args": [ # A list of arguments that will be presented to the step when it is started.
1891                  #
1892                  # If the image used to run the step's container has an entrypoint, the `args`
1893                  # are used as arguments to that entrypoint. If the image does not define
1894                  # an entrypoint, the first element in args is used as the entrypoint,
1895                  # and the remainder will be used as arguments.
1896                "A String",
1897              ],
1898              "env": [ # A list of environment variable definitions to be used when running a step.
1899                  #
1900                  # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1901                  # being given the value "VALUE".
1902                "A String",
1903              ],
1904              "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1905                  # This build step will not start until all the build steps in `wait_for`
1906                  # have completed successfully. If `wait_for` is empty, this build step will
1907                  # start when all previous build steps in the `Build.Steps` list have
1908                  # completed successfully.
1909                "A String",
1910              ],
1911              "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
1912                  # time limit and will be allowed to continue to run until either it completes
1913                  # or the build itself times out.
1914              "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
1915                  # Management Service crypto key. These values must be specified in the
1916                  # build's `Secret`.
1917                "A String",
1918              ],
1919              "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
1920                  # If unset, the image's default entrypoint is used.
1921              "volumes": [ # List of volumes to mount into the build step.
1922                  #
1923                  # Each volume is created as an empty volume prior to execution of the
1924                  # build step. Upon completion of the build, volumes and their contents are
1925                  # discarded.
1926                  #
1927                  # Using a named volume in only one step is not valid as it is indicative
1928                  # of a build request with an incorrect configuration.
1929                { # Volume describes a Docker container volume which is mounted into build steps
1930                    # in order to persist files across build step execution.
1931                  "path": "A String", # Path at which to mount the volume.
1932                      #
1933                      # Paths must be absolute and cannot conflict with other volume paths on the
1934                      # same build step or with certain reserved volume paths.
1935                  "name": "A String", # Name of the volume to mount.
1936                      #
1937                      # Volume names must be unique per build step and must be valid names for
1938                      # Docker volumes. Each named volume must be used by at least two build steps.
1939                },
1940              ],
1941              "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1942                "endTime": "A String", # End of time span.
1943                "startTime": "A String", # Start of time span.
1944              },
1945              "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
1946                  # builder image only.
1947                "endTime": "A String", # End of time span.
1948                "startTime": "A String", # Start of time span.
1949              },
1950              "id": "A String", # Unique identifier for this build step, used in `wait_for` to
1951                  # reference this build step as a dependency.
1952              "dir": "A String", # Working directory to use when running this step's container.
1953                  #
1954                  # If this value is a relative path, it is relative to the build's working
1955                  # directory. If this value is absolute, it may be outside the build's working
1956                  # directory, in which case the contents of the path may not be persisted
1957                  # across build step executions, unless a `volume` for that path is specified.
1958                  #
1959                  # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1960                  # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1961                  # the step's execution.
1962              "name": "A String", # Required. The name of the container image that will run this particular
1963                  # build step.
1964                  #
1965                  # If the image is available in the host's Docker daemon's cache, it
1966                  # will be run directly. If not, the host will attempt to pull the image
1967                  # first, using the builder service account's credentials if necessary.
1968                  #
1969                  # The Docker daemon's cache will already have the latest versions of all of
1970                  # the officially supported build steps
1971                  # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1972                  # The Docker daemon will also have cached many of the layers for some popular
1973                  # images, like "ubuntu", "debian", but they will be refreshed at the time you
1974                  # attempt to use them.
1975                  #
1976                  # If you built an image in a previous build step, it will be stored in the
1977                  # host's Docker daemon's cache and is available to use as the name for a
1978                  # later build step.
1979            },
1980          ],
1981          "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1982              # granularity. If this amount of time elapses, work on the build will cease
1983              # and the build status will be `TIMEOUT`.
1984              #
1985              # Default time is ten minutes.
1986          "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1987              # [Bucket Name
1988              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1989              # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1990          "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1991            "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
1992                # checks.
1993            "logging": "A String", # Option to specify the logging mode, which determines where the logs are
1994                # stored.
1995            "volumes": [ # Global list of volumes to mount for ALL build steps
1996                #
1997                # Each volume is created as an empty volume prior to starting the build
1998                # process. Upon completion of the build, volumes and their contents are
1999                # discarded. Global volume names and paths cannot conflict with the volumes
2000                # defined a build step.
2001                #
2002                # Using a global volume in a build with only one step is not valid as
2003                # it is indicative of a build request with an incorrect configuration.
2004              { # Volume describes a Docker container volume which is mounted into build steps
2005                  # in order to persist files across build step execution.
2006                "path": "A String", # Path at which to mount the volume.
2007                    #
2008                    # Paths must be absolute and cannot conflict with other volume paths on the
2009                    # same build step or with certain reserved volume paths.
2010                "name": "A String", # Name of the volume to mount.
2011                    #
2012                    # Volume names must be unique per build step and must be valid names for
2013                    # Docker volumes. Each named volume must be used by at least two build steps.
2014              },
2015            ],
2016            "workerPool": "A String", # Option to specify a `WorkerPool` for the build. User specifies the pool
2017                # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
2018                # This is an experimental field.
2019            "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
2020                # Storage.
2021            "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
2022              "A String",
2023            ],
2024            "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
2025                # Key Management Service crypto key. These values must be specified in the
2026                # build's `Secret`. These variables will be available to all build steps
2027                # in this build.
2028              "A String",
2029            ],
2030            "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
2031                # "disk free"; some of the space will be used by the operating system and
2032                # build utilities. Also note that this is the minimum disk size that will be
2033                # allocated for the build -- the build may run with a larger disk than
2034                # requested. At present, the maximum disk size is 1000GB; builds that request
2035                # more than the maximum are rejected with an error.
2036            "env": [ # A list of global environment variable definitions that will exist for all
2037                # build steps in this build. If a variable is defined in both globally and in
2038                # a build step, the variable will use the build step value.
2039                #
2040                # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
2041                # being given the value "VALUE".
2042              "A String",
2043            ],
2044            "requestedVerifyOption": "A String", # Requested verifiability options.
2045            "machineType": "A String", # Compute Engine machine type on which to run the build.
2046          },
2047          "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
2048        },
2049        "includedFiles": [ # If any of the files altered in the commit pass the ignored_files
2050            # filter and included_files is empty, then as far as this filter is
2051            # concerned, we should trigger the build.
2052            #
2053            # If any of the files altered in the commit pass the ignored_files
2054            # filter and included_files is not empty, then we make sure that at
2055            # least one of those files matches a included_files glob. If not,
2056            # then we do not trigger a build.
2057          "A String",
2058        ],
2059        "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
2060            #
2061            # Branch and tag names in trigger templates are interpreted as regular
2062            # expressions. Any branch or tag change that matches that regular expression
2063            # will trigger a build.
2064          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
2065              # project ID requesting the build is assumed.
2066          "commitSha": "A String", # Explicit commit SHA to build.
2067          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
2068              # assumed.
2069          "tagName": "A String", # Name of the tag to build.
2070          "branchName": "A String", # Name of the branch to build.
2071          "dir": "A String", # Directory, relative to the source root, in which to run the build.
2072              #
2073              # This must be a relative path. If a step's `dir` is specified and is an
2074              # absolute path, this value is ignored for that step's execution.
2075        },
2076        "id": "A String", # Output only. Unique identifier of the trigger.
2077      },
2078    ],
2079  }</pre>
2080</div>
2081
2082<div class="method">
2083    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2084  <pre>Retrieves the next page of results.
2085
2086Args:
2087  previous_request: The request for the previous page. (required)
2088  previous_response: The response from the request for the previous page. (required)
2089
2090Returns:
2091  A request object that you can call 'execute()' on to request the next
2092  page. Returns None if there are no more items in the collection.
2093    </pre>
2094</div>
2095
2096<div class="method">
2097    <code class="details" id="patch">patch(projectId, triggerId, body, x__xgafv=None)</code>
2098  <pre>Updates a `BuildTrigger` by its project ID and trigger ID.
2099
2100This API is experimental.
2101
2102Args:
2103  projectId: string, ID of the project that owns the trigger. (required)
2104  triggerId: string, ID of the `BuildTrigger` to update. (required)
2105  body: object, The request body. (required)
2106    The object takes the form of:
2107
2108{ # Configuration for an automated build in response to source repository
2109    # changes.
2110  "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
2111      # a build whenever a GitHub event is received.
2112      # build whenever a GitHub event is received.
2113      #
2114      # This message is experimental.
2115    "name": "A String", # Name of the repository.
2116    "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
2117        # Requests.
2118      "commentControl": "A String", # Whether to block builds on a "/gcbrun" comment from a repository owner or
2119          # collaborator.
2120      "branch": "A String", # Regex of branches to match.
2121          #
2122          # The syntax of the regular expressions accepted is the syntax accepted by
2123          # RE2 and described at https://github.com/google/re2/wiki/Syntax
2124    },
2125    "owner": "A String", # Owner of the repository.
2126    "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
2127      "tag": "A String", # Regexes of tags to match.
2128          #
2129          # The syntax of the regular expressions accepted is the syntax accepted by
2130          # RE2 and described at https://github.com/google/re2/wiki/Syntax
2131      "branch": "A String", # Regexes of branches to match.
2132          #
2133          # The syntax of the regular expressions accepted is the syntax accepted by
2134          # RE2 and described at https://github.com/google/re2/wiki/Syntax
2135    },
2136    "installationId": "A String", # The installationID that emmits the GitHub event.
2137    "checkSuite": { # A CheckSuiteFilter is a filter that indicates that we should build on all # Output only. Indicates that a build was generated from a check suite
2138        # event.
2139        # check suite events.
2140    },
2141  },
2142  "description": "A String", # Human-readable description of this trigger.
2143  "tags": [ # Tags for annotation of a `BuildTrigger`
2144    "A String",
2145  ],
2146  "ignoredFiles": [ # ignored_files and included_files are file glob matches using
2147      # http://godoc/pkg/path/filepath#Match extended with support for "**".
2148      #
2149      # If ignored_files and changed files are both empty, then they are
2150      # not used to determine whether or not to trigger a build.
2151      #
2152      # If ignored_files is not empty, then we ignore any files that match
2153      # any of the ignored_file globs. If the change has no files that are
2154      # outside of the ignored_files globs, then we do not trigger a build.
2155    "A String",
2156  ],
2157  "filename": "A String", # Path, from the source root, to a file whose contents is used for the
2158      # template.
2159  "createTime": "A String", # Output only. Time when the trigger was created.
2160  "substitutions": { # Substitutions data for Build resource.
2161    "a_key": "A String",
2162  },
2163  "disabled": True or False, # If true, the trigger will never result in a build.
2164  "build": { # A build resource in the Cloud Build API. # Contents of the build template.
2165      #
2166      # At a high level, a `Build` describes where to find source code, how to build
2167      # it (for example, the builder image to run on the source), and where to store
2168      # the built artifacts.
2169      #
2170      # Fields can include the following variables, which will be expanded when the
2171      # build is created:
2172      #
2173      # - $PROJECT_ID: the project ID of the build.
2174      # - $BUILD_ID: the autogenerated ID of the build.
2175      # - $REPO_NAME: the source repository name specified by RepoSource.
2176      # - $BRANCH_NAME: the branch name specified by RepoSource.
2177      # - $TAG_NAME: the tag name specified by RepoSource.
2178      # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
2179      #   resolved from the specified branch or tag.
2180      # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
2181    "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
2182      "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
2183          # corresponding to build step indices.
2184          #
2185          # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
2186          # can produce this output by writing to `$BUILDER_OUTPUT/output`.
2187          # Only the first 4KB of data is stored.
2188        "A String",
2189      ],
2190      "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
2191        "endTime": "A String", # End of time span.
2192        "startTime": "A String", # Start of time span.
2193      },
2194      "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
2195      "images": [ # Container images that were built as a part of the build.
2196        { # An image built by the pipeline.
2197          "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
2198            "endTime": "A String", # End of time span.
2199            "startTime": "A String", # Start of time span.
2200          },
2201          "name": "A String", # Name used to push the container image to Google Container Registry, as
2202              # presented to `docker push`.
2203          "digest": "A String", # Docker Registry 2.0 digest.
2204        },
2205      ],
2206      "buildStepImages": [ # List of build step digests, in the order corresponding to build step
2207          # indices.
2208        "A String",
2209      ],
2210      "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
2211    },
2212    "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
2213        # some source was used for this build.
2214      "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
2215          # revisions resolved.
2216        "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
2217            # project ID requesting the build is assumed.
2218        "commitSha": "A String", # Explicit commit SHA to build.
2219        "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
2220            # assumed.
2221        "tagName": "A String", # Name of the tag to build.
2222        "branchName": "A String", # Name of the branch to build.
2223        "dir": "A String", # Directory, relative to the source root, in which to run the build.
2224            #
2225            # This must be a relative path. If a step's `dir` is specified and is an
2226            # absolute path, this value is ignored for that step's execution.
2227      },
2228      "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
2229          # the original source integrity was maintained in the build. Note that
2230          # `FileHashes` will only be populated if `BuildOptions` has requested a
2231          # `SourceProvenanceHash`.
2232          #
2233          # The keys to this map are file paths used as build source and the values
2234          # contain the hash values for those files.
2235          #
2236          # If the build source came in a single package such as a gzipped tarfile
2237          # (`.tar.gz`), the `FileHash` will be for the single path to that file.
2238        "a_key": { # Container message for hashes of byte content of files, used in
2239            # SourceProvenance messages to verify integrity of source input to the build.
2240          "fileHash": [ # Collection of file hashes.
2241            { # Container message for hash values.
2242              "type": "A String", # The type of hash that was performed.
2243              "value": "A String", # The hash value.
2244            },
2245          ],
2246        },
2247      },
2248      "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
2249          # generations resolved.
2250        "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
2251            # omitted, the latest generation will be used.
2252        "object": "A String", # Google Cloud Storage object containing the source.
2253            #
2254            # This object must be a gzipped archive file (`.tar.gz`) containing source to
2255            # build.
2256        "bucket": "A String", # Google Cloud Storage bucket containing the source (see
2257            # [Bucket Name
2258            # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2259      },
2260    },
2261    "images": [ # A list of images to be pushed upon the successful completion of all build
2262        # steps.
2263        #
2264        # The images are pushed using the builder service account's credentials.
2265        #
2266        # The digests of the pushed images will be stored in the `Build` resource's
2267        # results field.
2268        #
2269        # If any of the images fail to be pushed, the build status is marked
2270        # `FAILURE`.
2271      "A String",
2272    ],
2273    "id": "A String", # Output only. Unique identifier of the build.
2274    "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
2275        # successful completion of all build steps.
2276        # successful completion of all build steps.
2277      "images": [ # A list of images to be pushed upon the successful completion of all build
2278          # steps.
2279          #
2280          # The images will be pushed using the builder service account's credentials.
2281          #
2282          # The digests of the pushed images will be stored in the Build resource's
2283          # results field.
2284          #
2285          # If any of the images fail to be pushed, the build is marked FAILURE.
2286        "A String",
2287      ],
2288      "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
2289          # completion of all build steps.
2290          #
2291          # Files in the workspace matching specified paths globs will be uploaded to
2292          # the specified Cloud Storage location using the builder service account's
2293          # credentials.
2294          #
2295          # The location and generation of the uploaded objects will be stored in the
2296          # Build resource's results field.
2297          #
2298          # If any objects fail to be pushed, the build is marked FAILURE.
2299          # completion of all build steps.
2300        "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
2301          "endTime": "A String", # End of time span.
2302          "startTime": "A String", # Start of time span.
2303        },
2304        "paths": [ # Path globs used to match files in the build's workspace.
2305          "A String",
2306        ],
2307        "location": "A String", # Cloud Storage bucket and optional object path, in the form
2308            # "gs://bucket/path/to/somewhere/". (see [Bucket Name
2309            # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2310            #
2311            # Files in the workspace matching any path pattern will be uploaded to
2312            # Cloud Storage with this location as a prefix.
2313      },
2314    },
2315    "projectId": "A String", # Output only. ID of the project.
2316    "substitutions": { # Substitutions data for `Build` resource.
2317      "a_key": "A String",
2318    },
2319    "source": { # Location of the source in a supported storage service. # The location of the source files to build.
2320      "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
2321          # Repository.
2322        "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
2323            # project ID requesting the build is assumed.
2324        "commitSha": "A String", # Explicit commit SHA to build.
2325        "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
2326            # assumed.
2327        "tagName": "A String", # Name of the tag to build.
2328        "branchName": "A String", # Name of the branch to build.
2329        "dir": "A String", # Directory, relative to the source root, in which to run the build.
2330            #
2331            # This must be a relative path. If a step's `dir` is specified and is an
2332            # absolute path, this value is ignored for that step's execution.
2333      },
2334      "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
2335        "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
2336            # omitted, the latest generation will be used.
2337        "object": "A String", # Google Cloud Storage object containing the source.
2338            #
2339            # This object must be a gzipped archive file (`.tar.gz`) containing source to
2340            # build.
2341        "bucket": "A String", # Google Cloud Storage bucket containing the source (see
2342            # [Bucket Name
2343            # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2344      },
2345    },
2346    "status": "A String", # Output only. Status of the build.
2347    "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
2348      "A String",
2349    ],
2350    "statusDetail": "A String", # Output only. Customer-readable message about the current status.
2351    "startTime": "A String", # Output only. Time at which execution of the build was started.
2352    "timing": { # Output only. Stores timing information for phases of the build. Valid keys
2353        # are:
2354        #
2355        # * BUILD: time to execute all build steps
2356        # * PUSH: time to push all specified images.
2357        # * FETCHSOURCE: time to fetch source.
2358        #
2359        # If the build does not specify source or images,
2360        # these keys will not be included.
2361      "a_key": { # Start and end times for a build execution phase.
2362        "endTime": "A String", # End of time span.
2363        "startTime": "A String", # Start of time span.
2364      },
2365    },
2366    "createTime": "A String", # Output only. Time at which the request to create the build was received.
2367    "finishTime": "A String", # Output only. Time at which execution of the build was finished.
2368        #
2369        # The difference between finish_time and start_time is the duration of the
2370        # build's execution.
2371    "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
2372        # was triggered automatically.
2373    "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
2374      { # Pairs a set of secret environment variables containing encrypted
2375          # values with the Cloud KMS key to use to decrypt the value.
2376        "secretEnv": { # Map of environment variable name to its encrypted value.
2377            #
2378            # Secret environment variables must be unique across all of a build's
2379            # secrets, and must be used by at least one build step. Values can be at most
2380            # 64 KB in size. There can be at most 100 secret values across all of a
2381            # build's secrets.
2382          "a_key": "A String",
2383        },
2384        "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
2385      },
2386    ],
2387    "steps": [ # Required. The operations to be performed on the workspace.
2388      { # A step in the build pipeline.
2389        "status": "A String", # Output only. Status of the build step. At this time, build step status is
2390            # only updated on build completion; step status is not updated in real-time
2391            # as the build progresses.
2392        "args": [ # A list of arguments that will be presented to the step when it is started.
2393            #
2394            # If the image used to run the step's container has an entrypoint, the `args`
2395            # are used as arguments to that entrypoint. If the image does not define
2396            # an entrypoint, the first element in args is used as the entrypoint,
2397            # and the remainder will be used as arguments.
2398          "A String",
2399        ],
2400        "env": [ # A list of environment variable definitions to be used when running a step.
2401            #
2402            # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
2403            # being given the value "VALUE".
2404          "A String",
2405        ],
2406        "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
2407            # This build step will not start until all the build steps in `wait_for`
2408            # have completed successfully. If `wait_for` is empty, this build step will
2409            # start when all previous build steps in the `Build.Steps` list have
2410            # completed successfully.
2411          "A String",
2412        ],
2413        "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
2414            # time limit and will be allowed to continue to run until either it completes
2415            # or the build itself times out.
2416        "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
2417            # Management Service crypto key. These values must be specified in the
2418            # build's `Secret`.
2419          "A String",
2420        ],
2421        "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
2422            # If unset, the image's default entrypoint is used.
2423        "volumes": [ # List of volumes to mount into the build step.
2424            #
2425            # Each volume is created as an empty volume prior to execution of the
2426            # build step. Upon completion of the build, volumes and their contents are
2427            # discarded.
2428            #
2429            # Using a named volume in only one step is not valid as it is indicative
2430            # of a build request with an incorrect configuration.
2431          { # Volume describes a Docker container volume which is mounted into build steps
2432              # in order to persist files across build step execution.
2433            "path": "A String", # Path at which to mount the volume.
2434                #
2435                # Paths must be absolute and cannot conflict with other volume paths on the
2436                # same build step or with certain reserved volume paths.
2437            "name": "A String", # Name of the volume to mount.
2438                #
2439                # Volume names must be unique per build step and must be valid names for
2440                # Docker volumes. Each named volume must be used by at least two build steps.
2441          },
2442        ],
2443        "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
2444          "endTime": "A String", # End of time span.
2445          "startTime": "A String", # Start of time span.
2446        },
2447        "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
2448            # builder image only.
2449          "endTime": "A String", # End of time span.
2450          "startTime": "A String", # Start of time span.
2451        },
2452        "id": "A String", # Unique identifier for this build step, used in `wait_for` to
2453            # reference this build step as a dependency.
2454        "dir": "A String", # Working directory to use when running this step's container.
2455            #
2456            # If this value is a relative path, it is relative to the build's working
2457            # directory. If this value is absolute, it may be outside the build's working
2458            # directory, in which case the contents of the path may not be persisted
2459            # across build step executions, unless a `volume` for that path is specified.
2460            #
2461            # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
2462            # which specifies an absolute path, the `RepoSource` `dir` is ignored for
2463            # the step's execution.
2464        "name": "A String", # Required. The name of the container image that will run this particular
2465            # build step.
2466            #
2467            # If the image is available in the host's Docker daemon's cache, it
2468            # will be run directly. If not, the host will attempt to pull the image
2469            # first, using the builder service account's credentials if necessary.
2470            #
2471            # The Docker daemon's cache will already have the latest versions of all of
2472            # the officially supported build steps
2473            # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
2474            # The Docker daemon will also have cached many of the layers for some popular
2475            # images, like "ubuntu", "debian", but they will be refreshed at the time you
2476            # attempt to use them.
2477            #
2478            # If you built an image in a previous build step, it will be stored in the
2479            # host's Docker daemon's cache and is available to use as the name for a
2480            # later build step.
2481      },
2482    ],
2483    "timeout": "A String", # Amount of time that this build should be allowed to run, to second
2484        # granularity. If this amount of time elapses, work on the build will cease
2485        # and the build status will be `TIMEOUT`.
2486        #
2487        # Default time is ten minutes.
2488    "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
2489        # [Bucket Name
2490        # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2491        # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
2492    "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
2493      "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
2494          # checks.
2495      "logging": "A String", # Option to specify the logging mode, which determines where the logs are
2496          # stored.
2497      "volumes": [ # Global list of volumes to mount for ALL build steps
2498          #
2499          # Each volume is created as an empty volume prior to starting the build
2500          # process. Upon completion of the build, volumes and their contents are
2501          # discarded. Global volume names and paths cannot conflict with the volumes
2502          # defined a build step.
2503          #
2504          # Using a global volume in a build with only one step is not valid as
2505          # it is indicative of a build request with an incorrect configuration.
2506        { # Volume describes a Docker container volume which is mounted into build steps
2507            # in order to persist files across build step execution.
2508          "path": "A String", # Path at which to mount the volume.
2509              #
2510              # Paths must be absolute and cannot conflict with other volume paths on the
2511              # same build step or with certain reserved volume paths.
2512          "name": "A String", # Name of the volume to mount.
2513              #
2514              # Volume names must be unique per build step and must be valid names for
2515              # Docker volumes. Each named volume must be used by at least two build steps.
2516        },
2517      ],
2518      "workerPool": "A String", # Option to specify a `WorkerPool` for the build. User specifies the pool
2519          # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
2520          # This is an experimental field.
2521      "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
2522          # Storage.
2523      "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
2524        "A String",
2525      ],
2526      "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
2527          # Key Management Service crypto key. These values must be specified in the
2528          # build's `Secret`. These variables will be available to all build steps
2529          # in this build.
2530        "A String",
2531      ],
2532      "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
2533          # "disk free"; some of the space will be used by the operating system and
2534          # build utilities. Also note that this is the minimum disk size that will be
2535          # allocated for the build -- the build may run with a larger disk than
2536          # requested. At present, the maximum disk size is 1000GB; builds that request
2537          # more than the maximum are rejected with an error.
2538      "env": [ # A list of global environment variable definitions that will exist for all
2539          # build steps in this build. If a variable is defined in both globally and in
2540          # a build step, the variable will use the build step value.
2541          #
2542          # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
2543          # being given the value "VALUE".
2544        "A String",
2545      ],
2546      "requestedVerifyOption": "A String", # Requested verifiability options.
2547      "machineType": "A String", # Compute Engine machine type on which to run the build.
2548    },
2549    "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
2550  },
2551  "includedFiles": [ # If any of the files altered in the commit pass the ignored_files
2552      # filter and included_files is empty, then as far as this filter is
2553      # concerned, we should trigger the build.
2554      #
2555      # If any of the files altered in the commit pass the ignored_files
2556      # filter and included_files is not empty, then we make sure that at
2557      # least one of those files matches a included_files glob. If not,
2558      # then we do not trigger a build.
2559    "A String",
2560  ],
2561  "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
2562      #
2563      # Branch and tag names in trigger templates are interpreted as regular
2564      # expressions. Any branch or tag change that matches that regular expression
2565      # will trigger a build.
2566    "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
2567        # project ID requesting the build is assumed.
2568    "commitSha": "A String", # Explicit commit SHA to build.
2569    "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
2570        # assumed.
2571    "tagName": "A String", # Name of the tag to build.
2572    "branchName": "A String", # Name of the branch to build.
2573    "dir": "A String", # Directory, relative to the source root, in which to run the build.
2574        #
2575        # This must be a relative path. If a step's `dir` is specified and is an
2576        # absolute path, this value is ignored for that step's execution.
2577  },
2578  "id": "A String", # Output only. Unique identifier of the trigger.
2579}
2580
2581  x__xgafv: string, V1 error format.
2582    Allowed values
2583      1 - v1 error format
2584      2 - v2 error format
2585
2586Returns:
2587  An object of the form:
2588
2589    { # Configuration for an automated build in response to source repository
2590      # changes.
2591    "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
2592        # a build whenever a GitHub event is received.
2593        # build whenever a GitHub event is received.
2594        #
2595        # This message is experimental.
2596      "name": "A String", # Name of the repository.
2597      "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
2598          # Requests.
2599        "commentControl": "A String", # Whether to block builds on a "/gcbrun" comment from a repository owner or
2600            # collaborator.
2601        "branch": "A String", # Regex of branches to match.
2602            #
2603            # The syntax of the regular expressions accepted is the syntax accepted by
2604            # RE2 and described at https://github.com/google/re2/wiki/Syntax
2605      },
2606      "owner": "A String", # Owner of the repository.
2607      "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
2608        "tag": "A String", # Regexes of tags to match.
2609            #
2610            # The syntax of the regular expressions accepted is the syntax accepted by
2611            # RE2 and described at https://github.com/google/re2/wiki/Syntax
2612        "branch": "A String", # Regexes of branches to match.
2613            #
2614            # The syntax of the regular expressions accepted is the syntax accepted by
2615            # RE2 and described at https://github.com/google/re2/wiki/Syntax
2616      },
2617      "installationId": "A String", # The installationID that emmits the GitHub event.
2618      "checkSuite": { # A CheckSuiteFilter is a filter that indicates that we should build on all # Output only. Indicates that a build was generated from a check suite
2619          # event.
2620          # check suite events.
2621      },
2622    },
2623    "description": "A String", # Human-readable description of this trigger.
2624    "tags": [ # Tags for annotation of a `BuildTrigger`
2625      "A String",
2626    ],
2627    "ignoredFiles": [ # ignored_files and included_files are file glob matches using
2628        # http://godoc/pkg/path/filepath#Match extended with support for "**".
2629        #
2630        # If ignored_files and changed files are both empty, then they are
2631        # not used to determine whether or not to trigger a build.
2632        #
2633        # If ignored_files is not empty, then we ignore any files that match
2634        # any of the ignored_file globs. If the change has no files that are
2635        # outside of the ignored_files globs, then we do not trigger a build.
2636      "A String",
2637    ],
2638    "filename": "A String", # Path, from the source root, to a file whose contents is used for the
2639        # template.
2640    "createTime": "A String", # Output only. Time when the trigger was created.
2641    "substitutions": { # Substitutions data for Build resource.
2642      "a_key": "A String",
2643    },
2644    "disabled": True or False, # If true, the trigger will never result in a build.
2645    "build": { # A build resource in the Cloud Build API. # Contents of the build template.
2646        #
2647        # At a high level, a `Build` describes where to find source code, how to build
2648        # it (for example, the builder image to run on the source), and where to store
2649        # the built artifacts.
2650        #
2651        # Fields can include the following variables, which will be expanded when the
2652        # build is created:
2653        #
2654        # - $PROJECT_ID: the project ID of the build.
2655        # - $BUILD_ID: the autogenerated ID of the build.
2656        # - $REPO_NAME: the source repository name specified by RepoSource.
2657        # - $BRANCH_NAME: the branch name specified by RepoSource.
2658        # - $TAG_NAME: the tag name specified by RepoSource.
2659        # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
2660        #   resolved from the specified branch or tag.
2661        # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
2662      "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
2663        "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
2664            # corresponding to build step indices.
2665            #
2666            # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
2667            # can produce this output by writing to `$BUILDER_OUTPUT/output`.
2668            # Only the first 4KB of data is stored.
2669          "A String",
2670        ],
2671        "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
2672          "endTime": "A String", # End of time span.
2673          "startTime": "A String", # Start of time span.
2674        },
2675        "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
2676        "images": [ # Container images that were built as a part of the build.
2677          { # An image built by the pipeline.
2678            "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
2679              "endTime": "A String", # End of time span.
2680              "startTime": "A String", # Start of time span.
2681            },
2682            "name": "A String", # Name used to push the container image to Google Container Registry, as
2683                # presented to `docker push`.
2684            "digest": "A String", # Docker Registry 2.0 digest.
2685          },
2686        ],
2687        "buildStepImages": [ # List of build step digests, in the order corresponding to build step
2688            # indices.
2689          "A String",
2690        ],
2691        "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
2692      },
2693      "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
2694          # some source was used for this build.
2695        "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
2696            # revisions resolved.
2697          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
2698              # project ID requesting the build is assumed.
2699          "commitSha": "A String", # Explicit commit SHA to build.
2700          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
2701              # assumed.
2702          "tagName": "A String", # Name of the tag to build.
2703          "branchName": "A String", # Name of the branch to build.
2704          "dir": "A String", # Directory, relative to the source root, in which to run the build.
2705              #
2706              # This must be a relative path. If a step's `dir` is specified and is an
2707              # absolute path, this value is ignored for that step's execution.
2708        },
2709        "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
2710            # the original source integrity was maintained in the build. Note that
2711            # `FileHashes` will only be populated if `BuildOptions` has requested a
2712            # `SourceProvenanceHash`.
2713            #
2714            # The keys to this map are file paths used as build source and the values
2715            # contain the hash values for those files.
2716            #
2717            # If the build source came in a single package such as a gzipped tarfile
2718            # (`.tar.gz`), the `FileHash` will be for the single path to that file.
2719          "a_key": { # Container message for hashes of byte content of files, used in
2720              # SourceProvenance messages to verify integrity of source input to the build.
2721            "fileHash": [ # Collection of file hashes.
2722              { # Container message for hash values.
2723                "type": "A String", # The type of hash that was performed.
2724                "value": "A String", # The hash value.
2725              },
2726            ],
2727          },
2728        },
2729        "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
2730            # generations resolved.
2731          "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
2732              # omitted, the latest generation will be used.
2733          "object": "A String", # Google Cloud Storage object containing the source.
2734              #
2735              # This object must be a gzipped archive file (`.tar.gz`) containing source to
2736              # build.
2737          "bucket": "A String", # Google Cloud Storage bucket containing the source (see
2738              # [Bucket Name
2739              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2740        },
2741      },
2742      "images": [ # A list of images to be pushed upon the successful completion of all build
2743          # steps.
2744          #
2745          # The images are pushed using the builder service account's credentials.
2746          #
2747          # The digests of the pushed images will be stored in the `Build` resource's
2748          # results field.
2749          #
2750          # If any of the images fail to be pushed, the build status is marked
2751          # `FAILURE`.
2752        "A String",
2753      ],
2754      "id": "A String", # Output only. Unique identifier of the build.
2755      "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
2756          # successful completion of all build steps.
2757          # successful completion of all build steps.
2758        "images": [ # A list of images to be pushed upon the successful completion of all build
2759            # steps.
2760            #
2761            # The images will be pushed using the builder service account's credentials.
2762            #
2763            # The digests of the pushed images will be stored in the Build resource's
2764            # results field.
2765            #
2766            # If any of the images fail to be pushed, the build is marked FAILURE.
2767          "A String",
2768        ],
2769        "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
2770            # completion of all build steps.
2771            #
2772            # Files in the workspace matching specified paths globs will be uploaded to
2773            # the specified Cloud Storage location using the builder service account's
2774            # credentials.
2775            #
2776            # The location and generation of the uploaded objects will be stored in the
2777            # Build resource's results field.
2778            #
2779            # If any objects fail to be pushed, the build is marked FAILURE.
2780            # completion of all build steps.
2781          "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
2782            "endTime": "A String", # End of time span.
2783            "startTime": "A String", # Start of time span.
2784          },
2785          "paths": [ # Path globs used to match files in the build's workspace.
2786            "A String",
2787          ],
2788          "location": "A String", # Cloud Storage bucket and optional object path, in the form
2789              # "gs://bucket/path/to/somewhere/". (see [Bucket Name
2790              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2791              #
2792              # Files in the workspace matching any path pattern will be uploaded to
2793              # Cloud Storage with this location as a prefix.
2794        },
2795      },
2796      "projectId": "A String", # Output only. ID of the project.
2797      "substitutions": { # Substitutions data for `Build` resource.
2798        "a_key": "A String",
2799      },
2800      "source": { # Location of the source in a supported storage service. # The location of the source files to build.
2801        "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
2802            # Repository.
2803          "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
2804              # project ID requesting the build is assumed.
2805          "commitSha": "A String", # Explicit commit SHA to build.
2806          "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
2807              # assumed.
2808          "tagName": "A String", # Name of the tag to build.
2809          "branchName": "A String", # Name of the branch to build.
2810          "dir": "A String", # Directory, relative to the source root, in which to run the build.
2811              #
2812              # This must be a relative path. If a step's `dir` is specified and is an
2813              # absolute path, this value is ignored for that step's execution.
2814        },
2815        "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
2816          "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
2817              # omitted, the latest generation will be used.
2818          "object": "A String", # Google Cloud Storage object containing the source.
2819              #
2820              # This object must be a gzipped archive file (`.tar.gz`) containing source to
2821              # build.
2822          "bucket": "A String", # Google Cloud Storage bucket containing the source (see
2823              # [Bucket Name
2824              # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2825        },
2826      },
2827      "status": "A String", # Output only. Status of the build.
2828      "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
2829        "A String",
2830      ],
2831      "statusDetail": "A String", # Output only. Customer-readable message about the current status.
2832      "startTime": "A String", # Output only. Time at which execution of the build was started.
2833      "timing": { # Output only. Stores timing information for phases of the build. Valid keys
2834          # are:
2835          #
2836          # * BUILD: time to execute all build steps
2837          # * PUSH: time to push all specified images.
2838          # * FETCHSOURCE: time to fetch source.
2839          #
2840          # If the build does not specify source or images,
2841          # these keys will not be included.
2842        "a_key": { # Start and end times for a build execution phase.
2843          "endTime": "A String", # End of time span.
2844          "startTime": "A String", # Start of time span.
2845        },
2846      },
2847      "createTime": "A String", # Output only. Time at which the request to create the build was received.
2848      "finishTime": "A String", # Output only. Time at which execution of the build was finished.
2849          #
2850          # The difference between finish_time and start_time is the duration of the
2851          # build's execution.
2852      "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
2853          # was triggered automatically.
2854      "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
2855        { # Pairs a set of secret environment variables containing encrypted
2856            # values with the Cloud KMS key to use to decrypt the value.
2857          "secretEnv": { # Map of environment variable name to its encrypted value.
2858              #
2859              # Secret environment variables must be unique across all of a build's
2860              # secrets, and must be used by at least one build step. Values can be at most
2861              # 64 KB in size. There can be at most 100 secret values across all of a
2862              # build's secrets.
2863            "a_key": "A String",
2864          },
2865          "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
2866        },
2867      ],
2868      "steps": [ # Required. The operations to be performed on the workspace.
2869        { # A step in the build pipeline.
2870          "status": "A String", # Output only. Status of the build step. At this time, build step status is
2871              # only updated on build completion; step status is not updated in real-time
2872              # as the build progresses.
2873          "args": [ # A list of arguments that will be presented to the step when it is started.
2874              #
2875              # If the image used to run the step's container has an entrypoint, the `args`
2876              # are used as arguments to that entrypoint. If the image does not define
2877              # an entrypoint, the first element in args is used as the entrypoint,
2878              # and the remainder will be used as arguments.
2879            "A String",
2880          ],
2881          "env": [ # A list of environment variable definitions to be used when running a step.
2882              #
2883              # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
2884              # being given the value "VALUE".
2885            "A String",
2886          ],
2887          "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
2888              # This build step will not start until all the build steps in `wait_for`
2889              # have completed successfully. If `wait_for` is empty, this build step will
2890              # start when all previous build steps in the `Build.Steps` list have
2891              # completed successfully.
2892            "A String",
2893          ],
2894          "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
2895              # time limit and will be allowed to continue to run until either it completes
2896              # or the build itself times out.
2897          "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
2898              # Management Service crypto key. These values must be specified in the
2899              # build's `Secret`.
2900            "A String",
2901          ],
2902          "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
2903              # If unset, the image's default entrypoint is used.
2904          "volumes": [ # List of volumes to mount into the build step.
2905              #
2906              # Each volume is created as an empty volume prior to execution of the
2907              # build step. Upon completion of the build, volumes and their contents are
2908              # discarded.
2909              #
2910              # Using a named volume in only one step is not valid as it is indicative
2911              # of a build request with an incorrect configuration.
2912            { # Volume describes a Docker container volume which is mounted into build steps
2913                # in order to persist files across build step execution.
2914              "path": "A String", # Path at which to mount the volume.
2915                  #
2916                  # Paths must be absolute and cannot conflict with other volume paths on the
2917                  # same build step or with certain reserved volume paths.
2918              "name": "A String", # Name of the volume to mount.
2919                  #
2920                  # Volume names must be unique per build step and must be valid names for
2921                  # Docker volumes. Each named volume must be used by at least two build steps.
2922            },
2923          ],
2924          "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
2925            "endTime": "A String", # End of time span.
2926            "startTime": "A String", # Start of time span.
2927          },
2928          "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
2929              # builder image only.
2930            "endTime": "A String", # End of time span.
2931            "startTime": "A String", # Start of time span.
2932          },
2933          "id": "A String", # Unique identifier for this build step, used in `wait_for` to
2934              # reference this build step as a dependency.
2935          "dir": "A String", # Working directory to use when running this step's container.
2936              #
2937              # If this value is a relative path, it is relative to the build's working
2938              # directory. If this value is absolute, it may be outside the build's working
2939              # directory, in which case the contents of the path may not be persisted
2940              # across build step executions, unless a `volume` for that path is specified.
2941              #
2942              # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
2943              # which specifies an absolute path, the `RepoSource` `dir` is ignored for
2944              # the step's execution.
2945          "name": "A String", # Required. The name of the container image that will run this particular
2946              # build step.
2947              #
2948              # If the image is available in the host's Docker daemon's cache, it
2949              # will be run directly. If not, the host will attempt to pull the image
2950              # first, using the builder service account's credentials if necessary.
2951              #
2952              # The Docker daemon's cache will already have the latest versions of all of
2953              # the officially supported build steps
2954              # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
2955              # The Docker daemon will also have cached many of the layers for some popular
2956              # images, like "ubuntu", "debian", but they will be refreshed at the time you
2957              # attempt to use them.
2958              #
2959              # If you built an image in a previous build step, it will be stored in the
2960              # host's Docker daemon's cache and is available to use as the name for a
2961              # later build step.
2962        },
2963      ],
2964      "timeout": "A String", # Amount of time that this build should be allowed to run, to second
2965          # granularity. If this amount of time elapses, work on the build will cease
2966          # and the build status will be `TIMEOUT`.
2967          #
2968          # Default time is ten minutes.
2969      "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
2970          # [Bucket Name
2971          # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2972          # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
2973      "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
2974        "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
2975            # checks.
2976        "logging": "A String", # Option to specify the logging mode, which determines where the logs are
2977            # stored.
2978        "volumes": [ # Global list of volumes to mount for ALL build steps
2979            #
2980            # Each volume is created as an empty volume prior to starting the build
2981            # process. Upon completion of the build, volumes and their contents are
2982            # discarded. Global volume names and paths cannot conflict with the volumes
2983            # defined a build step.
2984            #
2985            # Using a global volume in a build with only one step is not valid as
2986            # it is indicative of a build request with an incorrect configuration.
2987          { # Volume describes a Docker container volume which is mounted into build steps
2988              # in order to persist files across build step execution.
2989            "path": "A String", # Path at which to mount the volume.
2990                #
2991                # Paths must be absolute and cannot conflict with other volume paths on the
2992                # same build step or with certain reserved volume paths.
2993            "name": "A String", # Name of the volume to mount.
2994                #
2995                # Volume names must be unique per build step and must be valid names for
2996                # Docker volumes. Each named volume must be used by at least two build steps.
2997          },
2998        ],
2999        "workerPool": "A String", # Option to specify a `WorkerPool` for the build. User specifies the pool
3000            # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
3001            # This is an experimental field.
3002        "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
3003            # Storage.
3004        "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
3005          "A String",
3006        ],
3007        "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
3008            # Key Management Service crypto key. These values must be specified in the
3009            # build's `Secret`. These variables will be available to all build steps
3010            # in this build.
3011          "A String",
3012        ],
3013        "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
3014            # "disk free"; some of the space will be used by the operating system and
3015            # build utilities. Also note that this is the minimum disk size that will be
3016            # allocated for the build -- the build may run with a larger disk than
3017            # requested. At present, the maximum disk size is 1000GB; builds that request
3018            # more than the maximum are rejected with an error.
3019        "env": [ # A list of global environment variable definitions that will exist for all
3020            # build steps in this build. If a variable is defined in both globally and in
3021            # a build step, the variable will use the build step value.
3022            #
3023            # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
3024            # being given the value "VALUE".
3025          "A String",
3026        ],
3027        "requestedVerifyOption": "A String", # Requested verifiability options.
3028        "machineType": "A String", # Compute Engine machine type on which to run the build.
3029      },
3030      "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
3031    },
3032    "includedFiles": [ # If any of the files altered in the commit pass the ignored_files
3033        # filter and included_files is empty, then as far as this filter is
3034        # concerned, we should trigger the build.
3035        #
3036        # If any of the files altered in the commit pass the ignored_files
3037        # filter and included_files is not empty, then we make sure that at
3038        # least one of those files matches a included_files glob. If not,
3039        # then we do not trigger a build.
3040      "A String",
3041    ],
3042    "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
3043        #
3044        # Branch and tag names in trigger templates are interpreted as regular
3045        # expressions. Any branch or tag change that matches that regular expression
3046        # will trigger a build.
3047      "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
3048          # project ID requesting the build is assumed.
3049      "commitSha": "A String", # Explicit commit SHA to build.
3050      "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
3051          # assumed.
3052      "tagName": "A String", # Name of the tag to build.
3053      "branchName": "A String", # Name of the branch to build.
3054      "dir": "A String", # Directory, relative to the source root, in which to run the build.
3055          #
3056          # This must be a relative path. If a step's `dir` is specified and is an
3057          # absolute path, this value is ignored for that step's execution.
3058    },
3059    "id": "A String", # Output only. Unique identifier of the trigger.
3060  }</pre>
3061</div>
3062
3063<div class="method">
3064    <code class="details" id="run">run(projectId, triggerId, body, x__xgafv=None)</code>
3065  <pre>Runs a `BuildTrigger` at a particular source revision.
3066
3067Args:
3068  projectId: string, ID of the project. (required)
3069  triggerId: string, ID of the trigger. (required)
3070  body: object, The request body. (required)
3071    The object takes the form of:
3072
3073{ # Location of the source in a Google Cloud Source Repository.
3074  "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
3075      # project ID requesting the build is assumed.
3076  "commitSha": "A String", # Explicit commit SHA to build.
3077  "repoName": "A String", # Name of the Cloud Source Repository. If omitted, the name "default" is
3078      # assumed.
3079  "tagName": "A String", # Name of the tag to build.
3080  "branchName": "A String", # Name of the branch to build.
3081  "dir": "A String", # Directory, relative to the source root, in which to run the build.
3082      #
3083      # This must be a relative path. If a step's `dir` is specified and is an
3084      # absolute path, this value is ignored for that step's execution.
3085}
3086
3087  x__xgafv: string, V1 error format.
3088    Allowed values
3089      1 - v1 error format
3090      2 - v2 error format
3091
3092Returns:
3093  An object of the form:
3094
3095    { # This resource represents a long-running operation that is the result of a
3096      # network API call.
3097    "metadata": { # Service-specific metadata associated with the operation.  It typically
3098        # contains progress information and common metadata such as create time.
3099        # Some services might not provide such metadata.  Any method that returns a
3100        # long-running operation should document the metadata type, if any.
3101      "a_key": "", # Properties of the object. Contains field @type with type URL.
3102    },
3103    "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
3104        # different programming environments, including REST APIs and RPC APIs. It is
3105        # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3106        # three pieces of data: error code, error message, and error details.
3107        #
3108        # You can find out more about this error model and how to work with it in the
3109        # [API Design Guide](https://cloud.google.com/apis/design/errors).
3110      "message": "A String", # A developer-facing error message, which should be in English. Any
3111          # user-facing error message should be localized and sent in the
3112          # google.rpc.Status.details field, or localized by the client.
3113      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
3114      "details": [ # A list of messages that carry the error details.  There is a common set of
3115          # message types for APIs to use.
3116        {
3117          "a_key": "", # Properties of the object. Contains field @type with type URL.
3118        },
3119      ],
3120    },
3121    "done": True or False, # If the value is `false`, it means the operation is still in progress.
3122        # If `true`, the operation is completed, and either `error` or `response` is
3123        # available.
3124    "response": { # The normal response of the operation in case of success.  If the original
3125        # method returns no data on success, such as `Delete`, the response is
3126        # `google.protobuf.Empty`.  If the original method is standard
3127        # `Get`/`Create`/`Update`, the response should be the resource.  For other
3128        # methods, the response should have the type `XxxResponse`, where `Xxx`
3129        # is the original method name.  For example, if the original method name
3130        # is `TakeSnapshot()`, the inferred response type is
3131        # `TakeSnapshotResponse`.
3132      "a_key": "", # Properties of the object. Contains field @type with type URL.
3133    },
3134    "name": "A String", # The server-assigned name, which is only unique within the same service that
3135        # originally returns it. If you use the default HTTP mapping, the
3136        # `name` should be a resource name ending with `operations/{unique_id}`.
3137  }</pre>
3138</div>
3139
3140</body></html>