blob: a4c8ba818ee204c88ea780d61d577c77b7251429 [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001<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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<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>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(projectId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a new `BuildTrigger`.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070080<p class="toc_element">
81 <code><a href="#delete">delete(projectId, triggerId, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Deletes a `BuildTrigger` by its project ID and trigger ID.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070083<p class="toc_element">
84 <code><a href="#get">get(projectId, triggerId, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Returns information about a `BuildTrigger`.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070086<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070087 <code><a href="#list">list(projectId, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<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>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(projectId, triggerId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Updates a `BuildTrigger` by its project ID and trigger ID.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#run">run(projectId, triggerId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Runs a `BuildTrigger` at a particular source revision.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070098<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 <pre>Creates a new `BuildTrigger`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700102
103This API is experimental.
104
105Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 projectId: string, Required. ID of the project for which to configure automatic builds. (required)
107 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700108 The object takes the form of:
109
110{ # Configuration for an automated build in response to source repository
111 # changes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700112 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following
113 # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
114 # keys in bindings.
115 &quot;a_key&quot;: &quot;A String&quot;,
116 },
117 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
118 #
119 # Branch and tag names in trigger templates are interpreted as regular
120 # expressions. Any branch or tag change that matches that regular expression
121 # will trigger a build.
122 #
123 # Mutually exclusive with `github`.
124 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
125 #
126 # The syntax of the regular expressions accepted is the syntax accepted by
127 # RE2 and described at https://github.com/google/re2/wiki/Syntax
128 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
129 #
130 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
131 # absolute path, this value is ignored for that step&#x27;s execution.
132 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
133 # Should only be used with RunBuildTrigger
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700134 &quot;a_key&quot;: &quot;A String&quot;,
135 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700136 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
137 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
138 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
139 # regex.
140 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700141 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700142 # The syntax of the regular expressions accepted is the syntax accepted by
143 # RE2 and described at https://github.com/google/re2/wiki/Syntax
144 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
145 # project ID requesting the build is assumed.
146 },
147 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
148 &quot;build&quot;: { # A build resource in the Cloud Build API. # Contents of the build template.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700149 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700150 # At a high level, a `Build` describes where to find source code, how to build
151 # it (for example, the builder image to run on the source), and where to store
152 # the built artifacts.
153 #
154 # Fields can include the following variables, which will be expanded when the
155 # build is created:
156 #
157 # - $PROJECT_ID: the project ID of the build.
158 # - $BUILD_ID: the autogenerated ID of the build.
159 # - $REPO_NAME: the source repository name specified by RepoSource.
160 # - $BRANCH_NAME: the branch name specified by RepoSource.
161 # - $TAG_NAME: the tag name specified by RepoSource.
162 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
163 # resolved from the specified branch or tag.
164 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
165 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
166 # than this value, the build will expire and the build status will be
167 # `EXPIRED`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700168 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700169 # The TTL starts ticking from create_time.
170 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
171 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
172 # some source was used for this build.
173 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any
174 # revisions resolved.
175 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700177 # The syntax of the regular expressions accepted is the syntax accepted by
178 # RE2 and described at https://github.com/google/re2/wiki/Syntax
179 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
182 # absolute path, this value is ignored for that step&#x27;s execution.
183 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
184 # Should only be used with RunBuildTrigger
185 &quot;a_key&quot;: &quot;A String&quot;,
186 },
187 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
188 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
189 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
190 # regex.
191 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
192 #
193 # The syntax of the regular expressions accepted is the syntax accepted by
194 # RE2 and described at https://github.com/google/re2/wiki/Syntax
195 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
196 # project ID requesting the build is assumed.
197 },
198 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any
199 # generations resolved.
200 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
201 # omitted, the latest generation will be used.
202 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
203 # [Bucket Name
204 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
205 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
206 #
207 # This object must be a gzipped archive file (`.tar.gz`) containing source to
208 # build.
209 },
210 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
211 # the original source integrity was maintained in the build. Note that
212 # `FileHashes` will only be populated if `BuildOptions` has requested a
213 # `SourceProvenanceHash`.
214 #
215 # The keys to this map are file paths used as build source and the values
216 # contain the hash values for those files.
217 #
218 # If the build source came in a single package such as a gzipped tarfile
219 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
220 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
221 # SourceProvenance messages to verify integrity of source input to the build.
222 &quot;fileHash&quot;: [ # Collection of file hashes.
223 { # Container message for hash values.
224 &quot;value&quot;: &quot;A String&quot;, # The hash value.
225 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
226 },
227 ],
228 },
229 },
230 },
231 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
232 { # Pairs a set of secret environment variables containing encrypted
233 # values with the Cloud KMS key to use to decrypt the value.
234 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
235 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
236 #
237 # Secret environment variables must be unique across all of a build&#x27;s
238 # secrets, and must be used by at least one build step. Values can be at most
239 # 64 KB in size. There can be at most 100 secret values across all of a
240 # build&#x27;s secrets.
241 &quot;a_key&quot;: &quot;A String&quot;,
242 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 },
244 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700245 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
246 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
247 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
248 # indices.
249 &quot;A String&quot;,
250 ],
251 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700253 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700255 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
256 &quot;images&quot;: [ # Container images that were built as a part of the build.
257 { # An image built by the pipeline.
258 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
259 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
260 # presented to `docker push`.
261 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
262 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
263 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
264 },
265 },
266 ],
267 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
268 # corresponding to build step indices.
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700270 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
271 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
272 # Only the first 4KB of data is stored.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700273 &quot;A String&quot;,
274 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700276 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
277 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
278 # are:
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700280 # * BUILD: time to execute all build steps
281 # * PUSH: time to push all specified images.
282 # * FETCHSOURCE: time to fetch source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700284 # If the build does not specify source or images,
285 # these keys will not be included.
286 &quot;a_key&quot;: { # Start and end times for a build execution phase.
287 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
288 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700291 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700293 # The difference between finish_time and start_time is the duration of the
294 # build&#x27;s execution.
295 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
296 # was triggered automatically.
297 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
298 # granularity. If this amount of time elapses, work on the build will cease
299 # and the build status will be `TIMEOUT`.
300 #
301 # `timeout` starts ticking from `startTime`.
302 #
303 # Default time is ten minutes.
304 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
305 # successful completion of all build steps.
306 # successful completion of all build steps.
307 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
308 # completion of all build steps.
309 #
310 # Files in the workspace matching specified paths globs will be uploaded to
311 # the specified Cloud Storage location using the builder service account&#x27;s
312 # credentials.
313 #
314 # The location and generation of the uploaded objects will be stored in the
315 # Build resource&#x27;s results field.
316 #
317 # If any objects fail to be pushed, the build is marked FAILURE.
318 # completion of all build steps.
319 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
320 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
321 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
322 #
323 # Files in the workspace matching any path pattern will be uploaded to
324 # Cloud Storage with this location as a prefix.
325 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700327 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
328 },
329 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
330 &quot;A String&quot;,
331 ],
332 },
333 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
334 # steps.
335 #
336 # The images will be pushed using the builder service account&#x27;s credentials.
337 #
338 # The digests of the pushed images will be stored in the Build resource&#x27;s
339 # results field.
340 #
341 # If any of the images fail to be pushed, the build is marked FAILURE.
342 &quot;A String&quot;,
343 ],
344 },
345 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
346 # [Bucket Name
347 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
348 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
349 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
350 { # A step in the build pipeline.
351 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
352 #
353 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
354 # are used as arguments to that entrypoint. If the image does not define
355 # an entrypoint, the first element in args is used as the entrypoint,
356 # and the remainder will be used as arguments.
357 &quot;A String&quot;,
358 ],
359 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
360 # If unset, the image&#x27;s default entrypoint is used.
361 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
362 # Management Service crypto key. These values must be specified in the
363 # build&#x27;s `Secret`.
364 &quot;A String&quot;,
365 ],
366 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
367 # only updated on build completion; step status is not updated in real-time
368 # as the build progresses.
369 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
370 #
371 # Each volume is created as an empty volume prior to execution of the
372 # build step. Upon completion of the build, volumes and their contents are
373 # discarded.
374 #
375 # Using a named volume in only one step is not valid as it is indicative
376 # of a build request with an incorrect configuration.
377 { # Volume describes a Docker container volume which is mounted into build steps
378 # in order to persist files across build step execution.
379 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
380 #
381 # Paths must be absolute and cannot conflict with other volume paths on the
382 # same build step or with certain reserved volume paths.
383 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
384 #
385 # Volume names must be unique per build step and must be valid names for
386 # Docker volumes. Each named volume must be used by at least two build steps.
387 },
388 ],
389 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
390 # time limit and will be allowed to continue to run until either it completes
391 # or the build itself times out.
392 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
393 #
394 # If this value is a relative path, it is relative to the build&#x27;s working
395 # directory. If this value is absolute, it may be outside the build&#x27;s working
396 # directory, in which case the contents of the path may not be persisted
397 # across build step executions, unless a `volume` for that path is specified.
398 #
399 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
400 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
401 # the step&#x27;s execution.
402 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
403 # reference this build step as a dependency.
404 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
405 #
406 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
407 # being given the value &quot;VALUE&quot;.
408 &quot;A String&quot;,
409 ],
410 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
411 # This build step will not start until all the build steps in `wait_for`
412 # have completed successfully. If `wait_for` is empty, this build step will
413 # start when all previous build steps in the `Build.Steps` list have
414 # completed successfully.
415 &quot;A String&quot;,
416 ],
417 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
418 # build step.
419 #
420 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
421 # will be run directly. If not, the host will attempt to pull the image
422 # first, using the builder service account&#x27;s credentials if necessary.
423 #
424 # The Docker daemon&#x27;s cache will already have the latest versions of all of
425 # the officially supported build steps
426 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
427 # The Docker daemon will also have cached many of the layers for some popular
428 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
429 # attempt to use them.
430 #
431 # If you built an image in a previous build step, it will be stored in the
432 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
433 # later build step.
434 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
435 # builder image only.
436 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
437 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
438 },
439 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
440 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
441 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 },
443 },
444 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700445 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
446 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
447 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
448 # steps.
449 #
450 # The images are pushed using the builder service account&#x27;s credentials.
451 #
452 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
453 # results field.
454 #
455 # If any of the images fail to be pushed, the build status is marked
456 # `FAILURE`.
457 &quot;A String&quot;,
458 ],
459 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
460 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
461 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
462 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
463 # omitted, the latest generation will be used.
464 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
465 # [Bucket Name
466 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
467 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
468 #
469 # This object must be a gzipped archive file (`.tar.gz`) containing source to
470 # build.
471 },
472 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
473 # Repository.
474 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
475 #
476 # The syntax of the regular expressions accepted is the syntax accepted by
477 # RE2 and described at https://github.com/google/re2/wiki/Syntax
478 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
479 #
480 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
481 # absolute path, this value is ignored for that step&#x27;s execution.
482 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
483 # Should only be used with RunBuildTrigger
484 &quot;a_key&quot;: &quot;A String&quot;,
485 },
486 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
487 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
488 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
489 # regex.
490 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
491 #
492 # The syntax of the regular expressions accepted is the syntax accepted by
493 # RE2 and described at https://github.com/google/re2/wiki/Syntax
494 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
495 # project ID requesting the build is assumed.
496 },
497 },
498 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
499 &quot;A String&quot;,
500 ],
501 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
502 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700504 # Each volume is created as an empty volume prior to starting the build
505 # process. Upon completion of the build, volumes and their contents are
506 # discarded. Global volume names and paths cannot conflict with the volumes
507 # defined a build step.
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700509 # Using a global volume in a build with only one step is not valid as
510 # it is indicative of a build request with an incorrect configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 { # Volume describes a Docker container volume which is mounted into build steps
512 # in order to persist files across build step execution.
513 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
514 #
515 # Paths must be absolute and cannot conflict with other volume paths on the
516 # same build step or with certain reserved volume paths.
517 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
518 #
519 # Volume names must be unique per build step and must be valid names for
520 # Docker volumes. Each named volume must be used by at least two build steps.
521 },
522 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700523 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
524 # build steps in this build. If a variable is defined in both globally and in
525 # a build step, the variable will use the build step value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700526 #
527 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
528 # being given the value &quot;VALUE&quot;.
529 &quot;A String&quot;,
530 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700531 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
532 &quot;A String&quot;,
533 ],
534 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
535 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
536 # Storage.
537 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
538 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
539 # checks.
540 #
541 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
542 # be overridden in the build configuration file.
543 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
544 # &quot;disk free&quot;; some of the space will be used by the operating system and
545 # build utilities. Also note that this is the minimum disk size that will be
546 # allocated for the build -- the build may run with a larger disk than
547 # requested. At present, the maximum disk size is 1000GB; builds that request
548 # more than the maximum are rejected with an error.
549 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
550 # Format: projects/{project}/workerPools/{workerPool}
551 #
552 # This field is experimental.
553 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
554 # logs are stored.
555 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
556 # Key Management Service crypto key. These values must be specified in the
557 # build&#x27;s `Secret`. These variables will be available to all build steps
558 # in this build.
559 &quot;A String&quot;,
560 ],
561 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
562 # operations to the substitutions.
563 #
564 # NOTE: this is always enabled for triggered builds and cannot be
565 # overridden in the build configuration file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700567 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
568 &quot;a_key&quot;: &quot;A String&quot;,
569 },
570 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
571 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
572 },
573 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using
574 # https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;.
575 #
576 # If ignored_files and changed files are both empty, then they are
577 # not used to determine whether or not to trigger a build.
578 #
579 # If ignored_files is not empty, then we ignore any files that match
580 # any of the ignored_file globs. If the change has no files that are
581 # outside of the ignored_files globs, then we do not trigger a build.
582 &quot;A String&quot;,
583 ],
584 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to a file whose contents is used for the
585 # template.
586 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
587 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project.
588 # Trigger names must meet the following requirements:
589 #
590 # + They must contain only alphanumeric characters and dashes.
591 # + They can be 1-64 characters long.
592 # + They must begin and end with an alphanumeric character.
593 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
594 &quot;A String&quot;,
595 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
597 # a build whenever a GitHub event is received.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700598 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 # Mutually exclusive with `trigger_template`.
600 # build whenever a GitHub event is received.
601 #
602 # This message is experimental.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700603 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
605 # Requests.
606 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match.
607 #
608 # The syntax of the regular expressions accepted is the syntax accepted by
609 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700610 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to
611 # comment `/gcbrun`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700614 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for
615 # https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
616 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for
617 # https://github.com/googlecloudplatform/cloud-builders is
618 # &quot;googlecloudplatform&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700619 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
620 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build.
621 #
622 # The syntax of the regular expressions accepted is the syntax accepted by
623 # RE2 and described at https://github.com/google/re2/wiki/Syntax
624 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the
625 # git_ref regex.
626 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build.
627 #
628 # The syntax of the regular expressions accepted is the syntax accepted by
629 # RE2 and described at https://github.com/google/re2/wiki/Syntax
630 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700632 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 # filter and included_files is empty, then as far as this filter is
635 # concerned, we should trigger the build.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700636 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700637 # If any of the files altered in the commit pass the ignored_files
638 # filter and included_files is not empty, then we make sure that at
639 # least one of those files matches a included_files glob. If not,
640 # then we do not trigger a build.
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700642 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700643 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
644 }
645
646 x__xgafv: string, V1 error format.
647 Allowed values
648 1 - v1 error format
649 2 - v2 error format
650
651Returns:
652 An object of the form:
653
654 { # Configuration for an automated build in response to source repository
655 # changes.
656 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following
657 # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
658 # keys in bindings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700659 &quot;a_key&quot;: &quot;A String&quot;,
660 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700661 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
662 #
663 # Branch and tag names in trigger templates are interpreted as regular
664 # expressions. Any branch or tag change that matches that regular expression
665 # will trigger a build.
666 #
667 # Mutually exclusive with `github`.
668 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
669 #
670 # The syntax of the regular expressions accepted is the syntax accepted by
671 # RE2 and described at https://github.com/google/re2/wiki/Syntax
672 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
673 #
674 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
675 # absolute path, this value is ignored for that step&#x27;s execution.
676 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
677 # Should only be used with RunBuildTrigger
678 &quot;a_key&quot;: &quot;A String&quot;,
679 },
680 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
681 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
682 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
683 # regex.
684 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
685 #
686 # The syntax of the regular expressions accepted is the syntax accepted by
687 # RE2 and described at https://github.com/google/re2/wiki/Syntax
688 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
689 # project ID requesting the build is assumed.
690 },
691 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
692 &quot;build&quot;: { # A build resource in the Cloud Build API. # Contents of the build template.
693 #
694 # At a high level, a `Build` describes where to find source code, how to build
695 # it (for example, the builder image to run on the source), and where to store
696 # the built artifacts.
697 #
698 # Fields can include the following variables, which will be expanded when the
699 # build is created:
700 #
701 # - $PROJECT_ID: the project ID of the build.
702 # - $BUILD_ID: the autogenerated ID of the build.
703 # - $REPO_NAME: the source repository name specified by RepoSource.
704 # - $BRANCH_NAME: the branch name specified by RepoSource.
705 # - $TAG_NAME: the tag name specified by RepoSource.
706 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
707 # resolved from the specified branch or tag.
708 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
709 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
710 # than this value, the build will expire and the build status will be
711 # `EXPIRED`.
712 #
713 # The TTL starts ticking from create_time.
714 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
715 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
716 # some source was used for this build.
717 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any
718 # revisions resolved.
719 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
720 #
721 # The syntax of the regular expressions accepted is the syntax accepted by
722 # RE2 and described at https://github.com/google/re2/wiki/Syntax
723 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
724 #
725 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
726 # absolute path, this value is ignored for that step&#x27;s execution.
727 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
728 # Should only be used with RunBuildTrigger
729 &quot;a_key&quot;: &quot;A String&quot;,
730 },
731 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
732 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
733 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
734 # regex.
735 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
736 #
737 # The syntax of the regular expressions accepted is the syntax accepted by
738 # RE2 and described at https://github.com/google/re2/wiki/Syntax
739 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
740 # project ID requesting the build is assumed.
741 },
742 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any
743 # generations resolved.
744 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
745 # omitted, the latest generation will be used.
746 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
747 # [Bucket Name
748 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
749 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
750 #
751 # This object must be a gzipped archive file (`.tar.gz`) containing source to
752 # build.
753 },
754 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
755 # the original source integrity was maintained in the build. Note that
756 # `FileHashes` will only be populated if `BuildOptions` has requested a
757 # `SourceProvenanceHash`.
758 #
759 # The keys to this map are file paths used as build source and the values
760 # contain the hash values for those files.
761 #
762 # If the build source came in a single package such as a gzipped tarfile
763 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
764 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
765 # SourceProvenance messages to verify integrity of source input to the build.
766 &quot;fileHash&quot;: [ # Collection of file hashes.
767 { # Container message for hash values.
768 &quot;value&quot;: &quot;A String&quot;, # The hash value.
769 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
770 },
771 ],
772 },
773 },
774 },
775 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
776 { # Pairs a set of secret environment variables containing encrypted
777 # values with the Cloud KMS key to use to decrypt the value.
778 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
779 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
780 #
781 # Secret environment variables must be unique across all of a build&#x27;s
782 # secrets, and must be used by at least one build step. Values can be at most
783 # 64 KB in size. There can be at most 100 secret values across all of a
784 # build&#x27;s secrets.
785 &quot;a_key&quot;: &quot;A String&quot;,
786 },
787 },
788 ],
789 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
790 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
791 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
792 # indices.
793 &quot;A String&quot;,
794 ],
795 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
796 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
797 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
798 },
799 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
800 &quot;images&quot;: [ # Container images that were built as a part of the build.
801 { # An image built by the pipeline.
802 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
803 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
804 # presented to `docker push`.
805 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
806 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
807 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
808 },
809 },
810 ],
811 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
812 # corresponding to build step indices.
813 #
814 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
815 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
816 # Only the first 4KB of data is stored.
817 &quot;A String&quot;,
818 ],
819 },
820 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
821 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
822 # are:
823 #
824 # * BUILD: time to execute all build steps
825 # * PUSH: time to push all specified images.
826 # * FETCHSOURCE: time to fetch source.
827 #
828 # If the build does not specify source or images,
829 # these keys will not be included.
830 &quot;a_key&quot;: { # Start and end times for a build execution phase.
831 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
832 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
833 },
834 },
835 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
836 #
837 # The difference between finish_time and start_time is the duration of the
838 # build&#x27;s execution.
839 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
840 # was triggered automatically.
841 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
842 # granularity. If this amount of time elapses, work on the build will cease
843 # and the build status will be `TIMEOUT`.
844 #
845 # `timeout` starts ticking from `startTime`.
846 #
847 # Default time is ten minutes.
848 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
849 # successful completion of all build steps.
850 # successful completion of all build steps.
851 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
852 # completion of all build steps.
853 #
854 # Files in the workspace matching specified paths globs will be uploaded to
855 # the specified Cloud Storage location using the builder service account&#x27;s
856 # credentials.
857 #
858 # The location and generation of the uploaded objects will be stored in the
859 # Build resource&#x27;s results field.
860 #
861 # If any objects fail to be pushed, the build is marked FAILURE.
862 # completion of all build steps.
863 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
864 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
865 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
866 #
867 # Files in the workspace matching any path pattern will be uploaded to
868 # Cloud Storage with this location as a prefix.
869 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
870 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
871 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
872 },
873 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
874 &quot;A String&quot;,
875 ],
876 },
877 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
878 # steps.
879 #
880 # The images will be pushed using the builder service account&#x27;s credentials.
881 #
882 # The digests of the pushed images will be stored in the Build resource&#x27;s
883 # results field.
884 #
885 # If any of the images fail to be pushed, the build is marked FAILURE.
886 &quot;A String&quot;,
887 ],
888 },
889 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
890 # [Bucket Name
891 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
892 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
893 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
894 { # A step in the build pipeline.
895 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
896 #
897 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
898 # are used as arguments to that entrypoint. If the image does not define
899 # an entrypoint, the first element in args is used as the entrypoint,
900 # and the remainder will be used as arguments.
901 &quot;A String&quot;,
902 ],
903 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
904 # If unset, the image&#x27;s default entrypoint is used.
905 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
906 # Management Service crypto key. These values must be specified in the
907 # build&#x27;s `Secret`.
908 &quot;A String&quot;,
909 ],
910 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
911 # only updated on build completion; step status is not updated in real-time
912 # as the build progresses.
913 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
914 #
915 # Each volume is created as an empty volume prior to execution of the
916 # build step. Upon completion of the build, volumes and their contents are
917 # discarded.
918 #
919 # Using a named volume in only one step is not valid as it is indicative
920 # of a build request with an incorrect configuration.
921 { # Volume describes a Docker container volume which is mounted into build steps
922 # in order to persist files across build step execution.
923 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
924 #
925 # Paths must be absolute and cannot conflict with other volume paths on the
926 # same build step or with certain reserved volume paths.
927 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
928 #
929 # Volume names must be unique per build step and must be valid names for
930 # Docker volumes. Each named volume must be used by at least two build steps.
931 },
932 ],
933 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
934 # time limit and will be allowed to continue to run until either it completes
935 # or the build itself times out.
936 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
937 #
938 # If this value is a relative path, it is relative to the build&#x27;s working
939 # directory. If this value is absolute, it may be outside the build&#x27;s working
940 # directory, in which case the contents of the path may not be persisted
941 # across build step executions, unless a `volume` for that path is specified.
942 #
943 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
944 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
945 # the step&#x27;s execution.
946 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
947 # reference this build step as a dependency.
948 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
949 #
950 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
951 # being given the value &quot;VALUE&quot;.
952 &quot;A String&quot;,
953 ],
954 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
955 # This build step will not start until all the build steps in `wait_for`
956 # have completed successfully. If `wait_for` is empty, this build step will
957 # start when all previous build steps in the `Build.Steps` list have
958 # completed successfully.
959 &quot;A String&quot;,
960 ],
961 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
962 # build step.
963 #
964 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
965 # will be run directly. If not, the host will attempt to pull the image
966 # first, using the builder service account&#x27;s credentials if necessary.
967 #
968 # The Docker daemon&#x27;s cache will already have the latest versions of all of
969 # the officially supported build steps
970 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
971 # The Docker daemon will also have cached many of the layers for some popular
972 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
973 # attempt to use them.
974 #
975 # If you built an image in a previous build step, it will be stored in the
976 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
977 # later build step.
978 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
979 # builder image only.
980 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
981 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
982 },
983 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
984 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
985 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
986 },
987 },
988 ],
989 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
990 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
991 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
992 # steps.
993 #
994 # The images are pushed using the builder service account&#x27;s credentials.
995 #
996 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
997 # results field.
998 #
999 # If any of the images fail to be pushed, the build status is marked
1000 # `FAILURE`.
1001 &quot;A String&quot;,
1002 ],
1003 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1004 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1005 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1006 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1007 # omitted, the latest generation will be used.
1008 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1009 # [Bucket Name
1010 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1011 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1012 #
1013 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1014 # build.
1015 },
1016 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
1017 # Repository.
1018 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1019 #
1020 # The syntax of the regular expressions accepted is the syntax accepted by
1021 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1022 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1023 #
1024 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1025 # absolute path, this value is ignored for that step&#x27;s execution.
1026 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1027 # Should only be used with RunBuildTrigger
1028 &quot;a_key&quot;: &quot;A String&quot;,
1029 },
1030 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1031 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1032 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1033 # regex.
1034 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1035 #
1036 # The syntax of the regular expressions accepted is the syntax accepted by
1037 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1038 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1039 # project ID requesting the build is assumed.
1040 },
1041 },
1042 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
1043 &quot;A String&quot;,
1044 ],
1045 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1046 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
1047 #
1048 # Each volume is created as an empty volume prior to starting the build
1049 # process. Upon completion of the build, volumes and their contents are
1050 # discarded. Global volume names and paths cannot conflict with the volumes
1051 # defined a build step.
1052 #
1053 # Using a global volume in a build with only one step is not valid as
1054 # it is indicative of a build request with an incorrect configuration.
1055 { # Volume describes a Docker container volume which is mounted into build steps
1056 # in order to persist files across build step execution.
1057 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1058 #
1059 # Paths must be absolute and cannot conflict with other volume paths on the
1060 # same build step or with certain reserved volume paths.
1061 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1062 #
1063 # Volume names must be unique per build step and must be valid names for
1064 # Docker volumes. Each named volume must be used by at least two build steps.
1065 },
1066 ],
1067 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
1068 # build steps in this build. If a variable is defined in both globally and in
1069 # a build step, the variable will use the build step value.
1070 #
1071 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1072 # being given the value &quot;VALUE&quot;.
1073 &quot;A String&quot;,
1074 ],
1075 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1076 &quot;A String&quot;,
1077 ],
1078 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1079 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
1080 # Storage.
1081 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1082 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
1083 # checks.
1084 #
1085 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
1086 # be overridden in the build configuration file.
1087 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
1088 # &quot;disk free&quot;; some of the space will be used by the operating system and
1089 # build utilities. Also note that this is the minimum disk size that will be
1090 # allocated for the build -- the build may run with a larger disk than
1091 # requested. At present, the maximum disk size is 1000GB; builds that request
1092 # more than the maximum are rejected with an error.
1093 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
1094 # Format: projects/{project}/workerPools/{workerPool}
1095 #
1096 # This field is experimental.
1097 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
1098 # logs are stored.
1099 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
1100 # Key Management Service crypto key. These values must be specified in the
1101 # build&#x27;s `Secret`. These variables will be available to all build steps
1102 # in this build.
1103 &quot;A String&quot;,
1104 ],
1105 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
1106 # operations to the substitutions.
1107 #
1108 # NOTE: this is always enabled for triggered builds and cannot be
1109 # overridden in the build configuration file.
1110 },
1111 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1112 &quot;a_key&quot;: &quot;A String&quot;,
1113 },
1114 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
1115 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1116 },
1117 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using
1118 # https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;.
1119 #
1120 # If ignored_files and changed files are both empty, then they are
1121 # not used to determine whether or not to trigger a build.
1122 #
1123 # If ignored_files is not empty, then we ignore any files that match
1124 # any of the ignored_file globs. If the change has no files that are
1125 # outside of the ignored_files globs, then we do not trigger a build.
1126 &quot;A String&quot;,
1127 ],
1128 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to a file whose contents is used for the
1129 # template.
1130 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
1131 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project.
1132 # Trigger names must meet the following requirements:
1133 #
1134 # + They must contain only alphanumeric characters and dashes.
1135 # + They can be 1-64 characters long.
1136 # + They must begin and end with an alphanumeric character.
1137 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
1138 &quot;A String&quot;,
1139 ],
1140 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
1141 # a build whenever a GitHub event is received.
1142 #
1143 # Mutually exclusive with `trigger_template`.
1144 # build whenever a GitHub event is received.
1145 #
1146 # This message is experimental.
1147 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
1148 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
1149 # Requests.
1150 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match.
1151 #
1152 # The syntax of the regular expressions accepted is the syntax accepted by
1153 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1154 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to
1155 # comment `/gcbrun`.
1156 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
1157 },
1158 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for
1159 # https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
1160 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for
1161 # https://github.com/googlecloudplatform/cloud-builders is
1162 # &quot;googlecloudplatform&quot;.
1163 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1164 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build.
1165 #
1166 # The syntax of the regular expressions accepted is the syntax accepted by
1167 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1168 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the
1169 # git_ref regex.
1170 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build.
1171 #
1172 # The syntax of the regular expressions accepted is the syntax accepted by
1173 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1174 },
1175 },
1176 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
1177 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files
1178 # filter and included_files is empty, then as far as this filter is
1179 # concerned, we should trigger the build.
1180 #
1181 # If any of the files altered in the commit pass the ignored_files
1182 # filter and included_files is not empty, then we make sure that at
1183 # least one of those files matches a included_files glob. If not,
1184 # then we do not trigger a build.
1185 &quot;A String&quot;,
1186 ],
1187 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
1188 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001189</div>
1190
1191<div class="method">
1192 <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 <pre>Deletes a `BuildTrigger` by its project ID and trigger ID.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001194
1195This API is experimental.
1196
1197Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 projectId: string, Required. ID of the project that owns the trigger. (required)
1199 triggerId: string, Required. ID of the `BuildTrigger` to delete. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001200 x__xgafv: string, V1 error format.
1201 Allowed values
1202 1 - v1 error format
1203 2 - v2 error format
1204
1205Returns:
1206 An object of the form:
1207
1208 { # A generic empty message that you can re-use to avoid defining duplicated
1209 # empty messages in your APIs. A typical example is to use it as the request
1210 # or the response type of an API method. For instance:
1211 #
1212 # service Foo {
1213 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1214 # }
1215 #
1216 # The JSON representation for `Empty` is empty JSON object `{}`.
1217 }</pre>
1218</div>
1219
1220<div class="method">
1221 <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 <pre>Returns information about a `BuildTrigger`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001223
1224This API is experimental.
1225
1226Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001227 projectId: string, Required. ID of the project that owns the trigger. (required)
1228 triggerId: string, Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001229 x__xgafv: string, V1 error format.
1230 Allowed values
1231 1 - v1 error format
1232 2 - v2 error format
1233
1234Returns:
1235 An object of the form:
1236
1237 { # Configuration for an automated build in response to source repository
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001238 # changes.
1239 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following
1240 # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
1241 # keys in bindings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001242 &quot;a_key&quot;: &quot;A String&quot;,
1243 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001244 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001245 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001246 # Branch and tag names in trigger templates are interpreted as regular
1247 # expressions. Any branch or tag change that matches that regular expression
1248 # will trigger a build.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001249 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001250 # Mutually exclusive with `github`.
1251 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1252 #
1253 # The syntax of the regular expressions accepted is the syntax accepted by
1254 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1255 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1256 #
1257 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1258 # absolute path, this value is ignored for that step&#x27;s execution.
1259 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1260 # Should only be used with RunBuildTrigger
1261 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001262 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001263 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1264 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1265 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1266 # regex.
1267 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1268 #
1269 # The syntax of the regular expressions accepted is the syntax accepted by
1270 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1271 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1272 # project ID requesting the build is assumed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001273 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001274 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
1275 &quot;build&quot;: { # A build resource in the Cloud Build API. # Contents of the build template.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001276 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001277 # At a high level, a `Build` describes where to find source code, how to build
1278 # it (for example, the builder image to run on the source), and where to store
1279 # the built artifacts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001280 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001281 # Fields can include the following variables, which will be expanded when the
1282 # build is created:
1283 #
1284 # - $PROJECT_ID: the project ID of the build.
1285 # - $BUILD_ID: the autogenerated ID of the build.
1286 # - $REPO_NAME: the source repository name specified by RepoSource.
1287 # - $BRANCH_NAME: the branch name specified by RepoSource.
1288 # - $TAG_NAME: the tag name specified by RepoSource.
1289 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1290 # resolved from the specified branch or tag.
1291 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1292 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
1293 # than this value, the build will expire and the build status will be
1294 # `EXPIRED`.
1295 #
1296 # The TTL starts ticking from create_time.
1297 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1298 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1299 # some source was used for this build.
1300 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any
1301 # revisions resolved.
1302 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1303 #
1304 # The syntax of the regular expressions accepted is the syntax accepted by
1305 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1306 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1307 #
1308 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1309 # absolute path, this value is ignored for that step&#x27;s execution.
1310 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1311 # Should only be used with RunBuildTrigger
1312 &quot;a_key&quot;: &quot;A String&quot;,
1313 },
1314 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1315 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1316 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1317 # regex.
1318 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1319 #
1320 # The syntax of the regular expressions accepted is the syntax accepted by
1321 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1322 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1323 # project ID requesting the build is assumed.
1324 },
1325 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any
1326 # generations resolved.
1327 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1328 # omitted, the latest generation will be used.
1329 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1330 # [Bucket Name
1331 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1332 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1333 #
1334 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1335 # build.
1336 },
1337 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
1338 # the original source integrity was maintained in the build. Note that
1339 # `FileHashes` will only be populated if `BuildOptions` has requested a
1340 # `SourceProvenanceHash`.
1341 #
1342 # The keys to this map are file paths used as build source and the values
1343 # contain the hash values for those files.
1344 #
1345 # If the build source came in a single package such as a gzipped tarfile
1346 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1347 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
1348 # SourceProvenance messages to verify integrity of source input to the build.
1349 &quot;fileHash&quot;: [ # Collection of file hashes.
1350 { # Container message for hash values.
1351 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1352 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1353 },
1354 ],
1355 },
1356 },
1357 },
1358 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
1359 { # Pairs a set of secret environment variables containing encrypted
1360 # values with the Cloud KMS key to use to decrypt the value.
1361 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1362 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
1363 #
1364 # Secret environment variables must be unique across all of a build&#x27;s
1365 # secrets, and must be used by at least one build step. Values can be at most
1366 # 64 KB in size. There can be at most 100 secret values across all of a
1367 # build&#x27;s secrets.
1368 &quot;a_key&quot;: &quot;A String&quot;,
1369 },
1370 },
1371 ],
1372 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1373 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1374 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
1375 # indices.
1376 &quot;A String&quot;,
1377 ],
1378 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1379 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1380 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1381 },
1382 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1383 &quot;images&quot;: [ # Container images that were built as a part of the build.
1384 { # An image built by the pipeline.
1385 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1386 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
1387 # presented to `docker push`.
1388 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1389 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1390 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1391 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001392 },
1393 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001394 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
1395 # corresponding to build step indices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001396 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001397 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1398 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1399 # Only the first 4KB of data is stored.
1400 &quot;A String&quot;,
1401 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001403 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1404 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
1405 # are:
Bu Sun Kim65020912020-05-20 12:08:20 -07001406 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001407 # * BUILD: time to execute all build steps
1408 # * PUSH: time to push all specified images.
1409 # * FETCHSOURCE: time to fetch source.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001411 # If the build does not specify source or images,
1412 # these keys will not be included.
1413 &quot;a_key&quot;: { # Start and end times for a build execution phase.
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001415 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 },
1417 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001418 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001420 # The difference between finish_time and start_time is the duration of the
1421 # build&#x27;s execution.
1422 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1423 # was triggered automatically.
1424 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
1425 # granularity. If this amount of time elapses, work on the build will cease
1426 # and the build status will be `TIMEOUT`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001428 # `timeout` starts ticking from `startTime`.
1429 #
1430 # Default time is ten minutes.
1431 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1432 # successful completion of all build steps.
1433 # successful completion of all build steps.
1434 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1435 # completion of all build steps.
1436 #
1437 # Files in the workspace matching specified paths globs will be uploaded to
1438 # the specified Cloud Storage location using the builder service account&#x27;s
1439 # credentials.
1440 #
1441 # The location and generation of the uploaded objects will be stored in the
1442 # Build resource&#x27;s results field.
1443 #
1444 # If any objects fail to be pushed, the build is marked FAILURE.
1445 # completion of all build steps.
1446 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
1447 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
1448 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Bu Sun Kim65020912020-05-20 12:08:20 -07001449 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001450 # Files in the workspace matching any path pattern will be uploaded to
1451 # Cloud Storage with this location as a prefix.
1452 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1453 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1454 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1455 },
1456 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1457 &quot;A String&quot;,
1458 ],
1459 },
1460 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1461 # steps.
1462 #
1463 # The images will be pushed using the builder service account&#x27;s credentials.
1464 #
1465 # The digests of the pushed images will be stored in the Build resource&#x27;s
1466 # results field.
1467 #
1468 # If any of the images fail to be pushed, the build is marked FAILURE.
1469 &quot;A String&quot;,
1470 ],
1471 },
1472 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
1473 # [Bucket Name
1474 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1475 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1476 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1477 { # A step in the build pipeline.
1478 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
Bu Sun Kim65020912020-05-20 12:08:20 -07001479 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001480 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
1481 # are used as arguments to that entrypoint. If the image does not define
1482 # an entrypoint, the first element in args is used as the entrypoint,
1483 # and the remainder will be used as arguments.
1484 &quot;A String&quot;,
1485 ],
1486 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
1487 # If unset, the image&#x27;s default entrypoint is used.
1488 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
1489 # Management Service crypto key. These values must be specified in the
1490 # build&#x27;s `Secret`.
1491 &quot;A String&quot;,
1492 ],
1493 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
1494 # only updated on build completion; step status is not updated in real-time
1495 # as the build progresses.
1496 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
1497 #
1498 # Each volume is created as an empty volume prior to execution of the
1499 # build step. Upon completion of the build, volumes and their contents are
1500 # discarded.
1501 #
1502 # Using a named volume in only one step is not valid as it is indicative
1503 # of a build request with an incorrect configuration.
1504 { # Volume describes a Docker container volume which is mounted into build steps
1505 # in order to persist files across build step execution.
1506 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1507 #
1508 # Paths must be absolute and cannot conflict with other volume paths on the
1509 # same build step or with certain reserved volume paths.
1510 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1511 #
1512 # Volume names must be unique per build step and must be valid names for
1513 # Docker volumes. Each named volume must be used by at least two build steps.
1514 },
1515 ],
1516 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
1517 # time limit and will be allowed to continue to run until either it completes
1518 # or the build itself times out.
1519 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
1520 #
1521 # If this value is a relative path, it is relative to the build&#x27;s working
1522 # directory. If this value is absolute, it may be outside the build&#x27;s working
1523 # directory, in which case the contents of the path may not be persisted
1524 # across build step executions, unless a `volume` for that path is specified.
1525 #
1526 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1527 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1528 # the step&#x27;s execution.
1529 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
1530 # reference this build step as a dependency.
1531 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
1532 #
1533 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1534 # being given the value &quot;VALUE&quot;.
1535 &quot;A String&quot;,
1536 ],
1537 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
1538 # This build step will not start until all the build steps in `wait_for`
1539 # have completed successfully. If `wait_for` is empty, this build step will
1540 # start when all previous build steps in the `Build.Steps` list have
1541 # completed successfully.
1542 &quot;A String&quot;,
1543 ],
1544 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
1545 # build step.
1546 #
1547 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
1548 # will be run directly. If not, the host will attempt to pull the image
1549 # first, using the builder service account&#x27;s credentials if necessary.
1550 #
1551 # The Docker daemon&#x27;s cache will already have the latest versions of all of
1552 # the officially supported build steps
1553 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1554 # The Docker daemon will also have cached many of the layers for some popular
1555 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
1556 # attempt to use them.
1557 #
1558 # If you built an image in a previous build step, it will be stored in the
1559 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
1560 # later build step.
1561 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
1562 # builder image only.
1563 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1564 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1565 },
1566 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1567 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1568 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1569 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 },
1571 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001572 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1573 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1574 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1575 # steps.
Bu Sun Kim65020912020-05-20 12:08:20 -07001576 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001577 # The images are pushed using the builder service account&#x27;s credentials.
1578 #
1579 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
1580 # results field.
1581 #
1582 # If any of the images fail to be pushed, the build status is marked
1583 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001584 &quot;A String&quot;,
1585 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001586 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1587 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1588 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1589 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1590 # omitted, the latest generation will be used.
1591 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1592 # [Bucket Name
1593 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1594 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1595 #
1596 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1597 # build.
1598 },
1599 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
1600 # Repository.
1601 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1602 #
1603 # The syntax of the regular expressions accepted is the syntax accepted by
1604 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1605 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1606 #
1607 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1608 # absolute path, this value is ignored for that step&#x27;s execution.
1609 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1610 # Should only be used with RunBuildTrigger
1611 &quot;a_key&quot;: &quot;A String&quot;,
1612 },
1613 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1614 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1615 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1616 # regex.
1617 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1618 #
1619 # The syntax of the regular expressions accepted is the syntax accepted by
1620 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1621 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1622 # project ID requesting the build is assumed.
1623 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001624 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001625 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
Bu Sun Kim65020912020-05-20 12:08:20 -07001626 &quot;A String&quot;,
1627 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001628 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1629 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
1630 #
1631 # Each volume is created as an empty volume prior to starting the build
1632 # process. Upon completion of the build, volumes and their contents are
1633 # discarded. Global volume names and paths cannot conflict with the volumes
1634 # defined a build step.
1635 #
1636 # Using a global volume in a build with only one step is not valid as
1637 # it is indicative of a build request with an incorrect configuration.
1638 { # Volume describes a Docker container volume which is mounted into build steps
1639 # in order to persist files across build step execution.
1640 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1641 #
1642 # Paths must be absolute and cannot conflict with other volume paths on the
1643 # same build step or with certain reserved volume paths.
1644 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1645 #
1646 # Volume names must be unique per build step and must be valid names for
1647 # Docker volumes. Each named volume must be used by at least two build steps.
1648 },
1649 ],
1650 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
1651 # build steps in this build. If a variable is defined in both globally and in
1652 # a build step, the variable will use the build step value.
1653 #
1654 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1655 # being given the value &quot;VALUE&quot;.
1656 &quot;A String&quot;,
1657 ],
1658 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1659 &quot;A String&quot;,
1660 ],
1661 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1662 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
1663 # Storage.
1664 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1665 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
1666 # checks.
1667 #
1668 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
1669 # be overridden in the build configuration file.
1670 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
1671 # &quot;disk free&quot;; some of the space will be used by the operating system and
1672 # build utilities. Also note that this is the minimum disk size that will be
1673 # allocated for the build -- the build may run with a larger disk than
1674 # requested. At present, the maximum disk size is 1000GB; builds that request
1675 # more than the maximum are rejected with an error.
1676 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
1677 # Format: projects/{project}/workerPools/{workerPool}
1678 #
1679 # This field is experimental.
1680 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
1681 # logs are stored.
1682 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
1683 # Key Management Service crypto key. These values must be specified in the
1684 # build&#x27;s `Secret`. These variables will be available to all build steps
1685 # in this build.
1686 &quot;A String&quot;,
1687 ],
1688 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
1689 # operations to the substitutions.
1690 #
1691 # NOTE: this is always enabled for triggered builds and cannot be
1692 # overridden in the build configuration file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001693 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001694 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1695 &quot;a_key&quot;: &quot;A String&quot;,
1696 },
1697 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
1698 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
Bu Sun Kim65020912020-05-20 12:08:20 -07001699 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001700 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using
1701 # https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;.
1702 #
1703 # If ignored_files and changed files are both empty, then they are
1704 # not used to determine whether or not to trigger a build.
1705 #
1706 # If ignored_files is not empty, then we ignore any files that match
1707 # any of the ignored_file globs. If the change has no files that are
1708 # outside of the ignored_files globs, then we do not trigger a build.
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 &quot;A String&quot;,
1710 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001711 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to a file whose contents is used for the
1712 # template.
1713 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
1714 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project.
1715 # Trigger names must meet the following requirements:
Dan O'Mearadd494642020-05-01 07:42:23 -07001716 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001717 # + They must contain only alphanumeric characters and dashes.
1718 # + They can be 1-64 characters long.
1719 # + They must begin and end with an alphanumeric character.
1720 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
1721 &quot;A String&quot;,
1722 ],
1723 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
1724 # a build whenever a GitHub event is received.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001725 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001726 # Mutually exclusive with `trigger_template`.
1727 # build whenever a GitHub event is received.
Dan O'Mearadd494642020-05-01 07:42:23 -07001728 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001729 # This message is experimental.
1730 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
1731 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
1732 # Requests.
1733 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match.
1734 #
1735 # The syntax of the regular expressions accepted is the syntax accepted by
1736 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1737 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to
1738 # comment `/gcbrun`.
1739 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
1740 },
1741 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for
1742 # https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
1743 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for
1744 # https://github.com/googlecloudplatform/cloud-builders is
1745 # &quot;googlecloudplatform&quot;.
1746 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1747 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build.
1748 #
1749 # The syntax of the regular expressions accepted is the syntax accepted by
1750 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1751 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the
1752 # git_ref regex.
1753 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build.
1754 #
1755 # The syntax of the regular expressions accepted is the syntax accepted by
1756 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1757 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001758 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001759 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
1760 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files
1761 # filter and included_files is empty, then as far as this filter is
1762 # concerned, we should trigger the build.
1763 #
1764 # If any of the files altered in the commit pass the ignored_files
1765 # filter and included_files is not empty, then we make sure that at
1766 # least one of those files matches a included_files glob. If not,
1767 # then we do not trigger a build.
1768 &quot;A String&quot;,
1769 ],
1770 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
1771 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001772</div>
1773
1774<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001775 <code class="details" id="list">list(projectId, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001776 <pre>Lists existing `BuildTrigger`s.
1777
1778This API is experimental.
1779
1780Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001781 projectId: string, Required. ID of the project for which to list BuildTriggers. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001782 pageToken: string, Token to provide to skip to a particular spot in the list.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001783 pageSize: integer, Number of results to return in the list.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001784 x__xgafv: string, V1 error format.
1785 Allowed values
1786 1 - v1 error format
1787 2 - v2 error format
1788
1789Returns:
1790 An object of the form:
1791
1792 { # Response containing existing `BuildTriggers`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001793 &quot;triggers&quot;: [ # `BuildTriggers` for the project, sorted by `create_time` descending.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001794 { # Configuration for an automated build in response to source repository
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001795 # changes.
1796 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following
1797 # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
1798 # keys in bindings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001799 &quot;a_key&quot;: &quot;A String&quot;,
1800 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001801 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001802 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001803 # Branch and tag names in trigger templates are interpreted as regular
1804 # expressions. Any branch or tag change that matches that regular expression
1805 # will trigger a build.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001806 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001807 # Mutually exclusive with `github`.
1808 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1809 #
1810 # The syntax of the regular expressions accepted is the syntax accepted by
1811 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1812 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1813 #
1814 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1815 # absolute path, this value is ignored for that step&#x27;s execution.
1816 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1817 # Should only be used with RunBuildTrigger
1818 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001819 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001820 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1821 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1822 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1823 # regex.
1824 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1825 #
1826 # The syntax of the regular expressions accepted is the syntax accepted by
1827 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1828 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1829 # project ID requesting the build is assumed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001830 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001831 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
1832 &quot;build&quot;: { # A build resource in the Cloud Build API. # Contents of the build template.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001833 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001834 # At a high level, a `Build` describes where to find source code, how to build
1835 # it (for example, the builder image to run on the source), and where to store
1836 # the built artifacts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001837 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001838 # Fields can include the following variables, which will be expanded when the
1839 # build is created:
1840 #
1841 # - $PROJECT_ID: the project ID of the build.
1842 # - $BUILD_ID: the autogenerated ID of the build.
1843 # - $REPO_NAME: the source repository name specified by RepoSource.
1844 # - $BRANCH_NAME: the branch name specified by RepoSource.
1845 # - $TAG_NAME: the tag name specified by RepoSource.
1846 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1847 # resolved from the specified branch or tag.
1848 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1849 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
1850 # than this value, the build will expire and the build status will be
1851 # `EXPIRED`.
1852 #
1853 # The TTL starts ticking from create_time.
1854 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1855 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1856 # some source was used for this build.
1857 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any
1858 # revisions resolved.
1859 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1860 #
1861 # The syntax of the regular expressions accepted is the syntax accepted by
1862 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1863 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1864 #
1865 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1866 # absolute path, this value is ignored for that step&#x27;s execution.
1867 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1868 # Should only be used with RunBuildTrigger
1869 &quot;a_key&quot;: &quot;A String&quot;,
1870 },
1871 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1872 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1873 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1874 # regex.
1875 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1876 #
1877 # The syntax of the regular expressions accepted is the syntax accepted by
1878 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1879 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1880 # project ID requesting the build is assumed.
1881 },
1882 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any
1883 # generations resolved.
1884 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1885 # omitted, the latest generation will be used.
1886 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1887 # [Bucket Name
1888 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1889 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1890 #
1891 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1892 # build.
1893 },
1894 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
1895 # the original source integrity was maintained in the build. Note that
1896 # `FileHashes` will only be populated if `BuildOptions` has requested a
1897 # `SourceProvenanceHash`.
1898 #
1899 # The keys to this map are file paths used as build source and the values
1900 # contain the hash values for those files.
1901 #
1902 # If the build source came in a single package such as a gzipped tarfile
1903 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1904 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
1905 # SourceProvenance messages to verify integrity of source input to the build.
1906 &quot;fileHash&quot;: [ # Collection of file hashes.
1907 { # Container message for hash values.
1908 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1909 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1910 },
1911 ],
1912 },
1913 },
1914 },
1915 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
1916 { # Pairs a set of secret environment variables containing encrypted
1917 # values with the Cloud KMS key to use to decrypt the value.
1918 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1919 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
1920 #
1921 # Secret environment variables must be unique across all of a build&#x27;s
1922 # secrets, and must be used by at least one build step. Values can be at most
1923 # 64 KB in size. There can be at most 100 secret values across all of a
1924 # build&#x27;s secrets.
1925 &quot;a_key&quot;: &quot;A String&quot;,
1926 },
1927 },
1928 ],
1929 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1930 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1931 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
1932 # indices.
1933 &quot;A String&quot;,
1934 ],
1935 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1936 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1937 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1938 },
1939 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1940 &quot;images&quot;: [ # Container images that were built as a part of the build.
1941 { # An image built by the pipeline.
1942 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1943 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
1944 # presented to `docker push`.
1945 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1946 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1947 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1948 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001949 },
1950 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001951 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
1952 # corresponding to build step indices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001953 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001954 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1955 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1956 # Only the first 4KB of data is stored.
1957 &quot;A String&quot;,
1958 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001959 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001960 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1961 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
1962 # are:
Bu Sun Kim65020912020-05-20 12:08:20 -07001963 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001964 # * BUILD: time to execute all build steps
1965 # * PUSH: time to push all specified images.
1966 # * FETCHSOURCE: time to fetch source.
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001968 # If the build does not specify source or images,
1969 # these keys will not be included.
1970 &quot;a_key&quot;: { # Start and end times for a build execution phase.
Bu Sun Kim65020912020-05-20 12:08:20 -07001971 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001972 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 },
1974 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001975 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim65020912020-05-20 12:08:20 -07001976 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001977 # The difference between finish_time and start_time is the duration of the
1978 # build&#x27;s execution.
1979 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1980 # was triggered automatically.
1981 &quot;timeout&quot;: &quot;A String&quot;, # 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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001984 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001985 # `timeout` starts ticking from `startTime`.
1986 #
1987 # Default time is ten minutes.
1988 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1989 # successful completion of all build steps.
1990 # successful completion of all build steps.
1991 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1992 # completion of all build steps.
1993 #
1994 # Files in the workspace matching specified paths globs will be uploaded to
1995 # the specified Cloud Storage location using the builder service account&#x27;s
1996 # credentials.
1997 #
1998 # The location and generation of the uploaded objects will be stored in the
1999 # Build resource&#x27;s results field.
2000 #
2001 # If any objects fail to be pushed, the build is marked FAILURE.
2002 # completion of all build steps.
2003 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
2004 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
2005 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Bu Sun Kim65020912020-05-20 12:08:20 -07002006 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002007 # Files in the workspace matching any path pattern will be uploaded to
2008 # Cloud Storage with this location as a prefix.
2009 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
2010 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2011 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
2012 },
2013 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
2014 &quot;A String&quot;,
2015 ],
2016 },
2017 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
2018 # steps.
2019 #
2020 # The images will be pushed using the builder service account&#x27;s credentials.
2021 #
2022 # The digests of the pushed images will be stored in the Build resource&#x27;s
2023 # results field.
2024 #
2025 # If any of the images fail to be pushed, the build is marked FAILURE.
2026 &quot;A String&quot;,
2027 ],
2028 },
2029 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
2030 # [Bucket Name
2031 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2032 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
2033 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
2034 { # A step in the build pipeline.
2035 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
Bu Sun Kim65020912020-05-20 12:08:20 -07002036 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002037 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
2038 # are used as arguments to that entrypoint. If the image does not define
2039 # an entrypoint, the first element in args is used as the entrypoint,
2040 # and the remainder will be used as arguments.
2041 &quot;A String&quot;,
2042 ],
2043 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
2044 # If unset, the image&#x27;s default entrypoint is used.
2045 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
2046 # Management Service crypto key. These values must be specified in the
2047 # build&#x27;s `Secret`.
2048 &quot;A String&quot;,
2049 ],
2050 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
2051 # only updated on build completion; step status is not updated in real-time
2052 # as the build progresses.
2053 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
2054 #
2055 # Each volume is created as an empty volume prior to execution of the
2056 # build step. Upon completion of the build, volumes and their contents are
2057 # discarded.
2058 #
2059 # Using a named volume in only one step is not valid as it is indicative
2060 # of a build request with an incorrect configuration.
2061 { # Volume describes a Docker container volume which is mounted into build steps
2062 # in order to persist files across build step execution.
2063 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
2064 #
2065 # Paths must be absolute and cannot conflict with other volume paths on the
2066 # same build step or with certain reserved volume paths.
2067 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
2068 #
2069 # Volume names must be unique per build step and must be valid names for
2070 # Docker volumes. Each named volume must be used by at least two build steps.
2071 },
2072 ],
2073 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
2074 # time limit and will be allowed to continue to run until either it completes
2075 # or the build itself times out.
2076 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
2077 #
2078 # If this value is a relative path, it is relative to the build&#x27;s working
2079 # directory. If this value is absolute, it may be outside the build&#x27;s working
2080 # directory, in which case the contents of the path may not be persisted
2081 # across build step executions, unless a `volume` for that path is specified.
2082 #
2083 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
2084 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
2085 # the step&#x27;s execution.
2086 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
2087 # reference this build step as a dependency.
2088 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
2089 #
2090 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
2091 # being given the value &quot;VALUE&quot;.
2092 &quot;A String&quot;,
2093 ],
2094 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
2095 # This build step will not start until all the build steps in `wait_for`
2096 # have completed successfully. If `wait_for` is empty, this build step will
2097 # start when all previous build steps in the `Build.Steps` list have
2098 # completed successfully.
2099 &quot;A String&quot;,
2100 ],
2101 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
2102 # build step.
2103 #
2104 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
2105 # will be run directly. If not, the host will attempt to pull the image
2106 # first, using the builder service account&#x27;s credentials if necessary.
2107 #
2108 # The Docker daemon&#x27;s cache will already have the latest versions of all of
2109 # the officially supported build steps
2110 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
2111 # The Docker daemon will also have cached many of the layers for some popular
2112 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
2113 # attempt to use them.
2114 #
2115 # If you built an image in a previous build step, it will be stored in the
2116 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
2117 # later build step.
2118 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
2119 # builder image only.
2120 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2121 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
2122 },
2123 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
2124 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2125 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
2126 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002127 },
2128 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002129 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
2130 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
2131 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
2132 # steps.
Bu Sun Kim65020912020-05-20 12:08:20 -07002133 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002134 # The images are pushed using the builder service account&#x27;s credentials.
2135 #
2136 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
2137 # results field.
2138 #
2139 # If any of the images fail to be pushed, the build status is marked
2140 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002141 &quot;A String&quot;,
2142 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002143 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
2144 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
2145 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
2146 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
2147 # omitted, the latest generation will be used.
2148 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
2149 # [Bucket Name
2150 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2151 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
2152 #
2153 # This object must be a gzipped archive file (`.tar.gz`) containing source to
2154 # build.
2155 },
2156 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
2157 # Repository.
2158 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
2159 #
2160 # The syntax of the regular expressions accepted is the syntax accepted by
2161 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2162 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
2163 #
2164 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
2165 # absolute path, this value is ignored for that step&#x27;s execution.
2166 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
2167 # Should only be used with RunBuildTrigger
2168 &quot;a_key&quot;: &quot;A String&quot;,
2169 },
2170 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
2171 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
2172 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
2173 # regex.
2174 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
2175 #
2176 # The syntax of the regular expressions accepted is the syntax accepted by
2177 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2178 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
2179 # project ID requesting the build is assumed.
2180 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002181 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002182 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
Bu Sun Kim65020912020-05-20 12:08:20 -07002183 &quot;A String&quot;,
2184 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002185 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
2186 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
2187 #
2188 # Each volume is created as an empty volume prior to starting the build
2189 # process. Upon completion of the build, volumes and their contents are
2190 # discarded. Global volume names and paths cannot conflict with the volumes
2191 # defined a build step.
2192 #
2193 # Using a global volume in a build with only one step is not valid as
2194 # it is indicative of a build request with an incorrect configuration.
2195 { # Volume describes a Docker container volume which is mounted into build steps
2196 # in order to persist files across build step execution.
2197 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
2198 #
2199 # Paths must be absolute and cannot conflict with other volume paths on the
2200 # same build step or with certain reserved volume paths.
2201 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
2202 #
2203 # Volume names must be unique per build step and must be valid names for
2204 # Docker volumes. Each named volume must be used by at least two build steps.
2205 },
2206 ],
2207 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
2208 # build steps in this build. If a variable is defined in both globally and in
2209 # a build step, the variable will use the build step value.
2210 #
2211 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
2212 # being given the value &quot;VALUE&quot;.
2213 &quot;A String&quot;,
2214 ],
2215 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
2216 &quot;A String&quot;,
2217 ],
2218 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
2219 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
2220 # Storage.
2221 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
2222 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
2223 # checks.
2224 #
2225 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
2226 # be overridden in the build configuration file.
2227 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
2228 # &quot;disk free&quot;; some of the space will be used by the operating system and
2229 # build utilities. Also note that this is the minimum disk size that will be
2230 # allocated for the build -- the build may run with a larger disk than
2231 # requested. At present, the maximum disk size is 1000GB; builds that request
2232 # more than the maximum are rejected with an error.
2233 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
2234 # Format: projects/{project}/workerPools/{workerPool}
2235 #
2236 # This field is experimental.
2237 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
2238 # logs are stored.
2239 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
2240 # Key Management Service crypto key. These values must be specified in the
2241 # build&#x27;s `Secret`. These variables will be available to all build steps
2242 # in this build.
2243 &quot;A String&quot;,
2244 ],
2245 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
2246 # operations to the substitutions.
2247 #
2248 # NOTE: this is always enabled for triggered builds and cannot be
2249 # overridden in the build configuration file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002250 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002251 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
2252 &quot;a_key&quot;: &quot;A String&quot;,
2253 },
2254 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
2255 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
Bu Sun Kim65020912020-05-20 12:08:20 -07002256 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002257 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using
2258 # https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;.
2259 #
2260 # If ignored_files and changed files are both empty, then they are
2261 # not used to determine whether or not to trigger a build.
2262 #
2263 # If ignored_files is not empty, then we ignore any files that match
2264 # any of the ignored_file globs. If the change has no files that are
2265 # outside of the ignored_files globs, then we do not trigger a build.
Bu Sun Kim65020912020-05-20 12:08:20 -07002266 &quot;A String&quot;,
2267 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002268 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to a file whose contents is used for the
2269 # template.
2270 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
2271 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project.
2272 # Trigger names must meet the following requirements:
Dan O'Mearadd494642020-05-01 07:42:23 -07002273 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002274 # + They must contain only alphanumeric characters and dashes.
2275 # + They can be 1-64 characters long.
2276 # + They must begin and end with an alphanumeric character.
2277 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
2278 &quot;A String&quot;,
2279 ],
2280 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
2281 # a build whenever a GitHub event is received.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002282 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002283 # Mutually exclusive with `trigger_template`.
2284 # build whenever a GitHub event is received.
Dan O'Mearadd494642020-05-01 07:42:23 -07002285 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002286 # This message is experimental.
2287 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
2288 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
2289 # Requests.
2290 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match.
2291 #
2292 # The syntax of the regular expressions accepted is the syntax accepted by
2293 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2294 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to
2295 # comment `/gcbrun`.
2296 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
2297 },
2298 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for
2299 # https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
2300 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for
2301 # https://github.com/googlecloudplatform/cloud-builders is
2302 # &quot;googlecloudplatform&quot;.
2303 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
2304 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build.
2305 #
2306 # The syntax of the regular expressions accepted is the syntax accepted by
2307 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2308 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the
2309 # git_ref regex.
2310 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build.
2311 #
2312 # The syntax of the regular expressions accepted is the syntax accepted by
2313 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2314 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002315 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002316 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
2317 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files
2318 # filter and included_files is empty, then as far as this filter is
2319 # concerned, we should trigger the build.
2320 #
2321 # If any of the files altered in the commit pass the ignored_files
2322 # filter and included_files is not empty, then we make sure that at
2323 # least one of those files matches a included_files glob. If not,
2324 # then we do not trigger a build.
2325 &quot;A String&quot;,
2326 ],
2327 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002328 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002329 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002330 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to receive the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002331 }</pre>
2332</div>
2333
2334<div class="method">
2335 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2336 <pre>Retrieves the next page of results.
2337
2338Args:
2339 previous_request: The request for the previous page. (required)
2340 previous_response: The response from the request for the previous page. (required)
2341
2342Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002343 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002344 page. Returns None if there are no more items in the collection.
2345 </pre>
2346</div>
2347
2348<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002349 <code class="details" id="patch">patch(projectId, triggerId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002350 <pre>Updates a `BuildTrigger` by its project ID and trigger ID.
2351
2352This API is experimental.
2353
2354Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002355 projectId: string, Required. ID of the project that owns the trigger. (required)
2356 triggerId: string, Required. ID of the `BuildTrigger` to update. (required)
2357 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002358 The object takes the form of:
2359
2360{ # Configuration for an automated build in response to source repository
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002361 # changes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002362 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following
2363 # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
2364 # keys in bindings.
2365 &quot;a_key&quot;: &quot;A String&quot;,
2366 },
2367 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
2368 #
2369 # Branch and tag names in trigger templates are interpreted as regular
2370 # expressions. Any branch or tag change that matches that regular expression
2371 # will trigger a build.
2372 #
2373 # Mutually exclusive with `github`.
2374 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
2375 #
2376 # The syntax of the regular expressions accepted is the syntax accepted by
2377 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2378 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
2379 #
2380 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
2381 # absolute path, this value is ignored for that step&#x27;s execution.
2382 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
2383 # Should only be used with RunBuildTrigger
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002384 &quot;a_key&quot;: &quot;A String&quot;,
2385 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002386 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
2387 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
2388 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
2389 # regex.
2390 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002391 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002392 # The syntax of the regular expressions accepted is the syntax accepted by
2393 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2394 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
2395 # project ID requesting the build is assumed.
2396 },
2397 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
2398 &quot;build&quot;: { # A build resource in the Cloud Build API. # Contents of the build template.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002399 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002400 # At a high level, a `Build` describes where to find source code, how to build
2401 # it (for example, the builder image to run on the source), and where to store
2402 # the built artifacts.
2403 #
2404 # Fields can include the following variables, which will be expanded when the
2405 # build is created:
2406 #
2407 # - $PROJECT_ID: the project ID of the build.
2408 # - $BUILD_ID: the autogenerated ID of the build.
2409 # - $REPO_NAME: the source repository name specified by RepoSource.
2410 # - $BRANCH_NAME: the branch name specified by RepoSource.
2411 # - $TAG_NAME: the tag name specified by RepoSource.
2412 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
2413 # resolved from the specified branch or tag.
2414 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
2415 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
2416 # than this value, the build will expire and the build status will be
2417 # `EXPIRED`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002418 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002419 # The TTL starts ticking from create_time.
2420 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
2421 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
2422 # some source was used for this build.
2423 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any
2424 # revisions resolved.
2425 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002426 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002427 # The syntax of the regular expressions accepted is the syntax accepted by
2428 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2429 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002430 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002431 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
2432 # absolute path, this value is ignored for that step&#x27;s execution.
2433 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
2434 # Should only be used with RunBuildTrigger
2435 &quot;a_key&quot;: &quot;A String&quot;,
2436 },
2437 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
2438 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
2439 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
2440 # regex.
2441 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
2442 #
2443 # The syntax of the regular expressions accepted is the syntax accepted by
2444 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2445 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
2446 # project ID requesting the build is assumed.
2447 },
2448 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any
2449 # generations resolved.
2450 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
2451 # omitted, the latest generation will be used.
2452 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
2453 # [Bucket Name
2454 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2455 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
2456 #
2457 # This object must be a gzipped archive file (`.tar.gz`) containing source to
2458 # build.
2459 },
2460 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
2461 # the original source integrity was maintained in the build. Note that
2462 # `FileHashes` will only be populated if `BuildOptions` has requested a
2463 # `SourceProvenanceHash`.
2464 #
2465 # The keys to this map are file paths used as build source and the values
2466 # contain the hash values for those files.
2467 #
2468 # If the build source came in a single package such as a gzipped tarfile
2469 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
2470 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
2471 # SourceProvenance messages to verify integrity of source input to the build.
2472 &quot;fileHash&quot;: [ # Collection of file hashes.
2473 { # Container message for hash values.
2474 &quot;value&quot;: &quot;A String&quot;, # The hash value.
2475 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
2476 },
2477 ],
2478 },
2479 },
2480 },
2481 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
2482 { # Pairs a set of secret environment variables containing encrypted
2483 # values with the Cloud KMS key to use to decrypt the value.
2484 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
2485 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
2486 #
2487 # Secret environment variables must be unique across all of a build&#x27;s
2488 # secrets, and must be used by at least one build step. Values can be at most
2489 # 64 KB in size. There can be at most 100 secret values across all of a
2490 # build&#x27;s secrets.
2491 &quot;a_key&quot;: &quot;A String&quot;,
2492 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002493 },
2494 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002495 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
2496 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
2497 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
2498 # indices.
2499 &quot;A String&quot;,
2500 ],
2501 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
Bu Sun Kim65020912020-05-20 12:08:20 -07002502 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002503 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -07002504 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002505 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
2506 &quot;images&quot;: [ # Container images that were built as a part of the build.
2507 { # An image built by the pipeline.
2508 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
2509 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
2510 # presented to `docker push`.
2511 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
2512 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2513 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
2514 },
2515 },
2516 ],
2517 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
2518 # corresponding to build step indices.
Bu Sun Kim65020912020-05-20 12:08:20 -07002519 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002520 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
2521 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
2522 # Only the first 4KB of data is stored.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002523 &quot;A String&quot;,
2524 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002525 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002526 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
2527 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
2528 # are:
Bu Sun Kim65020912020-05-20 12:08:20 -07002529 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002530 # * BUILD: time to execute all build steps
2531 # * PUSH: time to push all specified images.
2532 # * FETCHSOURCE: time to fetch source.
Bu Sun Kim65020912020-05-20 12:08:20 -07002533 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002534 # If the build does not specify source or images,
2535 # these keys will not be included.
2536 &quot;a_key&quot;: { # Start and end times for a build execution phase.
2537 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2538 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -07002539 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002540 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002541 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim65020912020-05-20 12:08:20 -07002542 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002543 # The difference between finish_time and start_time is the duration of the
2544 # build&#x27;s execution.
2545 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
2546 # was triggered automatically.
2547 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
2548 # granularity. If this amount of time elapses, work on the build will cease
2549 # and the build status will be `TIMEOUT`.
2550 #
2551 # `timeout` starts ticking from `startTime`.
2552 #
2553 # Default time is ten minutes.
2554 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
2555 # successful completion of all build steps.
2556 # successful completion of all build steps.
2557 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
2558 # completion of all build steps.
2559 #
2560 # Files in the workspace matching specified paths globs will be uploaded to
2561 # the specified Cloud Storage location using the builder service account&#x27;s
2562 # credentials.
2563 #
2564 # The location and generation of the uploaded objects will be stored in the
2565 # Build resource&#x27;s results field.
2566 #
2567 # If any objects fail to be pushed, the build is marked FAILURE.
2568 # completion of all build steps.
2569 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
2570 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
2571 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2572 #
2573 # Files in the workspace matching any path pattern will be uploaded to
2574 # Cloud Storage with this location as a prefix.
2575 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
Bu Sun Kim65020912020-05-20 12:08:20 -07002576 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002577 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
2578 },
2579 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
2580 &quot;A String&quot;,
2581 ],
2582 },
2583 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
2584 # steps.
2585 #
2586 # The images will be pushed using the builder service account&#x27;s credentials.
2587 #
2588 # The digests of the pushed images will be stored in the Build resource&#x27;s
2589 # results field.
2590 #
2591 # If any of the images fail to be pushed, the build is marked FAILURE.
2592 &quot;A String&quot;,
2593 ],
2594 },
2595 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
2596 # [Bucket Name
2597 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2598 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
2599 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
2600 { # A step in the build pipeline.
2601 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
2602 #
2603 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
2604 # are used as arguments to that entrypoint. If the image does not define
2605 # an entrypoint, the first element in args is used as the entrypoint,
2606 # and the remainder will be used as arguments.
2607 &quot;A String&quot;,
2608 ],
2609 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
2610 # If unset, the image&#x27;s default entrypoint is used.
2611 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
2612 # Management Service crypto key. These values must be specified in the
2613 # build&#x27;s `Secret`.
2614 &quot;A String&quot;,
2615 ],
2616 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
2617 # only updated on build completion; step status is not updated in real-time
2618 # as the build progresses.
2619 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
2620 #
2621 # Each volume is created as an empty volume prior to execution of the
2622 # build step. Upon completion of the build, volumes and their contents are
2623 # discarded.
2624 #
2625 # Using a named volume in only one step is not valid as it is indicative
2626 # of a build request with an incorrect configuration.
2627 { # Volume describes a Docker container volume which is mounted into build steps
2628 # in order to persist files across build step execution.
2629 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
2630 #
2631 # Paths must be absolute and cannot conflict with other volume paths on the
2632 # same build step or with certain reserved volume paths.
2633 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
2634 #
2635 # Volume names must be unique per build step and must be valid names for
2636 # Docker volumes. Each named volume must be used by at least two build steps.
2637 },
2638 ],
2639 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
2640 # time limit and will be allowed to continue to run until either it completes
2641 # or the build itself times out.
2642 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
2643 #
2644 # If this value is a relative path, it is relative to the build&#x27;s working
2645 # directory. If this value is absolute, it may be outside the build&#x27;s working
2646 # directory, in which case the contents of the path may not be persisted
2647 # across build step executions, unless a `volume` for that path is specified.
2648 #
2649 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
2650 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
2651 # the step&#x27;s execution.
2652 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
2653 # reference this build step as a dependency.
2654 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
2655 #
2656 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
2657 # being given the value &quot;VALUE&quot;.
2658 &quot;A String&quot;,
2659 ],
2660 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
2661 # This build step will not start until all the build steps in `wait_for`
2662 # have completed successfully. If `wait_for` is empty, this build step will
2663 # start when all previous build steps in the `Build.Steps` list have
2664 # completed successfully.
2665 &quot;A String&quot;,
2666 ],
2667 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
2668 # build step.
2669 #
2670 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
2671 # will be run directly. If not, the host will attempt to pull the image
2672 # first, using the builder service account&#x27;s credentials if necessary.
2673 #
2674 # The Docker daemon&#x27;s cache will already have the latest versions of all of
2675 # the officially supported build steps
2676 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
2677 # The Docker daemon will also have cached many of the layers for some popular
2678 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
2679 # attempt to use them.
2680 #
2681 # If you built an image in a previous build step, it will be stored in the
2682 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
2683 # later build step.
2684 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
2685 # builder image only.
2686 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2687 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
2688 },
2689 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
2690 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
2691 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim65020912020-05-20 12:08:20 -07002692 },
2693 },
2694 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002695 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
2696 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
2697 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
2698 # steps.
2699 #
2700 # The images are pushed using the builder service account&#x27;s credentials.
2701 #
2702 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
2703 # results field.
2704 #
2705 # If any of the images fail to be pushed, the build status is marked
2706 # `FAILURE`.
2707 &quot;A String&quot;,
2708 ],
2709 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
2710 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
2711 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
2712 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
2713 # omitted, the latest generation will be used.
2714 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
2715 # [Bucket Name
2716 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2717 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
2718 #
2719 # This object must be a gzipped archive file (`.tar.gz`) containing source to
2720 # build.
2721 },
2722 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
2723 # Repository.
2724 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
2725 #
2726 # The syntax of the regular expressions accepted is the syntax accepted by
2727 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2728 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
2729 #
2730 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
2731 # absolute path, this value is ignored for that step&#x27;s execution.
2732 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
2733 # Should only be used with RunBuildTrigger
2734 &quot;a_key&quot;: &quot;A String&quot;,
2735 },
2736 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
2737 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
2738 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
2739 # regex.
2740 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
2741 #
2742 # The syntax of the regular expressions accepted is the syntax accepted by
2743 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2744 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
2745 # project ID requesting the build is assumed.
2746 },
2747 },
2748 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
2749 &quot;A String&quot;,
2750 ],
2751 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
2752 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim65020912020-05-20 12:08:20 -07002753 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002754 # Each volume is created as an empty volume prior to starting the build
2755 # process. Upon completion of the build, volumes and their contents are
2756 # discarded. Global volume names and paths cannot conflict with the volumes
2757 # defined a build step.
Bu Sun Kim65020912020-05-20 12:08:20 -07002758 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002759 # Using a global volume in a build with only one step is not valid as
2760 # it is indicative of a build request with an incorrect configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -07002761 { # Volume describes a Docker container volume which is mounted into build steps
2762 # in order to persist files across build step execution.
2763 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
2764 #
2765 # Paths must be absolute and cannot conflict with other volume paths on the
2766 # same build step or with certain reserved volume paths.
2767 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
2768 #
2769 # Volume names must be unique per build step and must be valid names for
2770 # Docker volumes. Each named volume must be used by at least two build steps.
2771 },
2772 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002773 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
2774 # build steps in this build. If a variable is defined in both globally and in
2775 # a build step, the variable will use the build step value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002776 #
2777 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
2778 # being given the value &quot;VALUE&quot;.
2779 &quot;A String&quot;,
2780 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002781 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
2782 &quot;A String&quot;,
2783 ],
2784 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
2785 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
2786 # Storage.
2787 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
2788 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
2789 # checks.
2790 #
2791 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
2792 # be overridden in the build configuration file.
2793 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
2794 # &quot;disk free&quot;; some of the space will be used by the operating system and
2795 # build utilities. Also note that this is the minimum disk size that will be
2796 # allocated for the build -- the build may run with a larger disk than
2797 # requested. At present, the maximum disk size is 1000GB; builds that request
2798 # more than the maximum are rejected with an error.
2799 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
2800 # Format: projects/{project}/workerPools/{workerPool}
2801 #
2802 # This field is experimental.
2803 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
2804 # logs are stored.
2805 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
2806 # Key Management Service crypto key. These values must be specified in the
2807 # build&#x27;s `Secret`. These variables will be available to all build steps
2808 # in this build.
2809 &quot;A String&quot;,
2810 ],
2811 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
2812 # operations to the substitutions.
2813 #
2814 # NOTE: this is always enabled for triggered builds and cannot be
2815 # overridden in the build configuration file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002816 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002817 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
2818 &quot;a_key&quot;: &quot;A String&quot;,
2819 },
2820 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
2821 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
2822 },
2823 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using
2824 # https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;.
2825 #
2826 # If ignored_files and changed files are both empty, then they are
2827 # not used to determine whether or not to trigger a build.
2828 #
2829 # If ignored_files is not empty, then we ignore any files that match
2830 # any of the ignored_file globs. If the change has no files that are
2831 # outside of the ignored_files globs, then we do not trigger a build.
2832 &quot;A String&quot;,
2833 ],
2834 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to a file whose contents is used for the
2835 # template.
2836 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
2837 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project.
2838 # Trigger names must meet the following requirements:
2839 #
2840 # + They must contain only alphanumeric characters and dashes.
2841 # + They can be 1-64 characters long.
2842 # + They must begin and end with an alphanumeric character.
2843 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
2844 &quot;A String&quot;,
2845 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002846 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
2847 # a build whenever a GitHub event is received.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002848 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002849 # Mutually exclusive with `trigger_template`.
2850 # build whenever a GitHub event is received.
2851 #
2852 # This message is experimental.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002853 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
Bu Sun Kim65020912020-05-20 12:08:20 -07002854 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
2855 # Requests.
2856 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match.
2857 #
2858 # The syntax of the regular expressions accepted is the syntax accepted by
2859 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002860 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to
2861 # comment `/gcbrun`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002862 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
Bu Sun Kim65020912020-05-20 12:08:20 -07002863 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002864 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for
2865 # https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
2866 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for
2867 # https://github.com/googlecloudplatform/cloud-builders is
2868 # &quot;googlecloudplatform&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002869 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
2870 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build.
2871 #
2872 # The syntax of the regular expressions accepted is the syntax accepted by
2873 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2874 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the
2875 # git_ref regex.
2876 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build.
2877 #
2878 # The syntax of the regular expressions accepted is the syntax accepted by
2879 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2880 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002881 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002882 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
Bu Sun Kim65020912020-05-20 12:08:20 -07002883 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002884 # filter and included_files is empty, then as far as this filter is
2885 # concerned, we should trigger the build.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002886 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002887 # If any of the files altered in the commit pass the ignored_files
2888 # filter and included_files is not empty, then we make sure that at
2889 # least one of those files matches a included_files glob. If not,
2890 # then we do not trigger a build.
Bu Sun Kim65020912020-05-20 12:08:20 -07002891 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002892 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002893 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
2894 }
2895
2896 x__xgafv: string, V1 error format.
2897 Allowed values
2898 1 - v1 error format
2899 2 - v2 error format
2900
2901Returns:
2902 An object of the form:
2903
2904 { # Configuration for an automated build in response to source repository
2905 # changes.
2906 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following
2907 # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
2908 # keys in bindings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002909 &quot;a_key&quot;: &quot;A String&quot;,
2910 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002911 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build.
2912 #
2913 # Branch and tag names in trigger templates are interpreted as regular
2914 # expressions. Any branch or tag change that matches that regular expression
2915 # will trigger a build.
2916 #
2917 # Mutually exclusive with `github`.
2918 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
2919 #
2920 # The syntax of the regular expressions accepted is the syntax accepted by
2921 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2922 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
2923 #
2924 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
2925 # absolute path, this value is ignored for that step&#x27;s execution.
2926 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
2927 # Should only be used with RunBuildTrigger
2928 &quot;a_key&quot;: &quot;A String&quot;,
2929 },
2930 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
2931 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
2932 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
2933 # regex.
2934 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
2935 #
2936 # The syntax of the regular expressions accepted is the syntax accepted by
2937 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2938 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
2939 # project ID requesting the build is assumed.
2940 },
2941 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
2942 &quot;build&quot;: { # A build resource in the Cloud Build API. # Contents of the build template.
2943 #
2944 # At a high level, a `Build` describes where to find source code, how to build
2945 # it (for example, the builder image to run on the source), and where to store
2946 # the built artifacts.
2947 #
2948 # Fields can include the following variables, which will be expanded when the
2949 # build is created:
2950 #
2951 # - $PROJECT_ID: the project ID of the build.
2952 # - $BUILD_ID: the autogenerated ID of the build.
2953 # - $REPO_NAME: the source repository name specified by RepoSource.
2954 # - $BRANCH_NAME: the branch name specified by RepoSource.
2955 # - $TAG_NAME: the tag name specified by RepoSource.
2956 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
2957 # resolved from the specified branch or tag.
2958 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
2959 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
2960 # than this value, the build will expire and the build status will be
2961 # `EXPIRED`.
2962 #
2963 # The TTL starts ticking from create_time.
2964 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
2965 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
2966 # some source was used for this build.
2967 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any
2968 # revisions resolved.
2969 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
2970 #
2971 # The syntax of the regular expressions accepted is the syntax accepted by
2972 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2973 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
2974 #
2975 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
2976 # absolute path, this value is ignored for that step&#x27;s execution.
2977 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
2978 # Should only be used with RunBuildTrigger
2979 &quot;a_key&quot;: &quot;A String&quot;,
2980 },
2981 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
2982 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
2983 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
2984 # regex.
2985 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
2986 #
2987 # The syntax of the regular expressions accepted is the syntax accepted by
2988 # RE2 and described at https://github.com/google/re2/wiki/Syntax
2989 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
2990 # project ID requesting the build is assumed.
2991 },
2992 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any
2993 # generations resolved.
2994 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
2995 # omitted, the latest generation will be used.
2996 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
2997 # [Bucket Name
2998 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2999 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
3000 #
3001 # This object must be a gzipped archive file (`.tar.gz`) containing source to
3002 # build.
3003 },
3004 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
3005 # the original source integrity was maintained in the build. Note that
3006 # `FileHashes` will only be populated if `BuildOptions` has requested a
3007 # `SourceProvenanceHash`.
3008 #
3009 # The keys to this map are file paths used as build source and the values
3010 # contain the hash values for those files.
3011 #
3012 # If the build source came in a single package such as a gzipped tarfile
3013 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
3014 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
3015 # SourceProvenance messages to verify integrity of source input to the build.
3016 &quot;fileHash&quot;: [ # Collection of file hashes.
3017 { # Container message for hash values.
3018 &quot;value&quot;: &quot;A String&quot;, # The hash value.
3019 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
3020 },
3021 ],
3022 },
3023 },
3024 },
3025 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
3026 { # Pairs a set of secret environment variables containing encrypted
3027 # values with the Cloud KMS key to use to decrypt the value.
3028 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
3029 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
3030 #
3031 # Secret environment variables must be unique across all of a build&#x27;s
3032 # secrets, and must be used by at least one build step. Values can be at most
3033 # 64 KB in size. There can be at most 100 secret values across all of a
3034 # build&#x27;s secrets.
3035 &quot;a_key&quot;: &quot;A String&quot;,
3036 },
3037 },
3038 ],
3039 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
3040 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
3041 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
3042 # indices.
3043 &quot;A String&quot;,
3044 ],
3045 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
3046 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
3047 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
3048 },
3049 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
3050 &quot;images&quot;: [ # Container images that were built as a part of the build.
3051 { # An image built by the pipeline.
3052 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
3053 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
3054 # presented to `docker push`.
3055 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
3056 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
3057 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
3058 },
3059 },
3060 ],
3061 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
3062 # corresponding to build step indices.
3063 #
3064 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
3065 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
3066 # Only the first 4KB of data is stored.
3067 &quot;A String&quot;,
3068 ],
3069 },
3070 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
3071 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
3072 # are:
3073 #
3074 # * BUILD: time to execute all build steps
3075 # * PUSH: time to push all specified images.
3076 # * FETCHSOURCE: time to fetch source.
3077 #
3078 # If the build does not specify source or images,
3079 # these keys will not be included.
3080 &quot;a_key&quot;: { # Start and end times for a build execution phase.
3081 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
3082 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
3083 },
3084 },
3085 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
3086 #
3087 # The difference between finish_time and start_time is the duration of the
3088 # build&#x27;s execution.
3089 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
3090 # was triggered automatically.
3091 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
3092 # granularity. If this amount of time elapses, work on the build will cease
3093 # and the build status will be `TIMEOUT`.
3094 #
3095 # `timeout` starts ticking from `startTime`.
3096 #
3097 # Default time is ten minutes.
3098 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
3099 # successful completion of all build steps.
3100 # successful completion of all build steps.
3101 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
3102 # completion of all build steps.
3103 #
3104 # Files in the workspace matching specified paths globs will be uploaded to
3105 # the specified Cloud Storage location using the builder service account&#x27;s
3106 # credentials.
3107 #
3108 # The location and generation of the uploaded objects will be stored in the
3109 # Build resource&#x27;s results field.
3110 #
3111 # If any objects fail to be pushed, the build is marked FAILURE.
3112 # completion of all build steps.
3113 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
3114 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
3115 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
3116 #
3117 # Files in the workspace matching any path pattern will be uploaded to
3118 # Cloud Storage with this location as a prefix.
3119 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
3120 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
3121 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
3122 },
3123 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
3124 &quot;A String&quot;,
3125 ],
3126 },
3127 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
3128 # steps.
3129 #
3130 # The images will be pushed using the builder service account&#x27;s credentials.
3131 #
3132 # The digests of the pushed images will be stored in the Build resource&#x27;s
3133 # results field.
3134 #
3135 # If any of the images fail to be pushed, the build is marked FAILURE.
3136 &quot;A String&quot;,
3137 ],
3138 },
3139 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
3140 # [Bucket Name
3141 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
3142 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
3143 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
3144 { # A step in the build pipeline.
3145 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
3146 #
3147 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
3148 # are used as arguments to that entrypoint. If the image does not define
3149 # an entrypoint, the first element in args is used as the entrypoint,
3150 # and the remainder will be used as arguments.
3151 &quot;A String&quot;,
3152 ],
3153 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
3154 # If unset, the image&#x27;s default entrypoint is used.
3155 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
3156 # Management Service crypto key. These values must be specified in the
3157 # build&#x27;s `Secret`.
3158 &quot;A String&quot;,
3159 ],
3160 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
3161 # only updated on build completion; step status is not updated in real-time
3162 # as the build progresses.
3163 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
3164 #
3165 # Each volume is created as an empty volume prior to execution of the
3166 # build step. Upon completion of the build, volumes and their contents are
3167 # discarded.
3168 #
3169 # Using a named volume in only one step is not valid as it is indicative
3170 # of a build request with an incorrect configuration.
3171 { # Volume describes a Docker container volume which is mounted into build steps
3172 # in order to persist files across build step execution.
3173 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
3174 #
3175 # Paths must be absolute and cannot conflict with other volume paths on the
3176 # same build step or with certain reserved volume paths.
3177 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
3178 #
3179 # Volume names must be unique per build step and must be valid names for
3180 # Docker volumes. Each named volume must be used by at least two build steps.
3181 },
3182 ],
3183 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
3184 # time limit and will be allowed to continue to run until either it completes
3185 # or the build itself times out.
3186 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
3187 #
3188 # If this value is a relative path, it is relative to the build&#x27;s working
3189 # directory. If this value is absolute, it may be outside the build&#x27;s working
3190 # directory, in which case the contents of the path may not be persisted
3191 # across build step executions, unless a `volume` for that path is specified.
3192 #
3193 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
3194 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
3195 # the step&#x27;s execution.
3196 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
3197 # reference this build step as a dependency.
3198 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
3199 #
3200 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
3201 # being given the value &quot;VALUE&quot;.
3202 &quot;A String&quot;,
3203 ],
3204 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
3205 # This build step will not start until all the build steps in `wait_for`
3206 # have completed successfully. If `wait_for` is empty, this build step will
3207 # start when all previous build steps in the `Build.Steps` list have
3208 # completed successfully.
3209 &quot;A String&quot;,
3210 ],
3211 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
3212 # build step.
3213 #
3214 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
3215 # will be run directly. If not, the host will attempt to pull the image
3216 # first, using the builder service account&#x27;s credentials if necessary.
3217 #
3218 # The Docker daemon&#x27;s cache will already have the latest versions of all of
3219 # the officially supported build steps
3220 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
3221 # The Docker daemon will also have cached many of the layers for some popular
3222 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
3223 # attempt to use them.
3224 #
3225 # If you built an image in a previous build step, it will be stored in the
3226 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
3227 # later build step.
3228 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
3229 # builder image only.
3230 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
3231 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
3232 },
3233 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
3234 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
3235 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
3236 },
3237 },
3238 ],
3239 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
3240 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
3241 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
3242 # steps.
3243 #
3244 # The images are pushed using the builder service account&#x27;s credentials.
3245 #
3246 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
3247 # results field.
3248 #
3249 # If any of the images fail to be pushed, the build status is marked
3250 # `FAILURE`.
3251 &quot;A String&quot;,
3252 ],
3253 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
3254 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
3255 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
3256 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
3257 # omitted, the latest generation will be used.
3258 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
3259 # [Bucket Name
3260 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
3261 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
3262 #
3263 # This object must be a gzipped archive file (`.tar.gz`) containing source to
3264 # build.
3265 },
3266 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
3267 # Repository.
3268 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
3269 #
3270 # The syntax of the regular expressions accepted is the syntax accepted by
3271 # RE2 and described at https://github.com/google/re2/wiki/Syntax
3272 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
3273 #
3274 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
3275 # absolute path, this value is ignored for that step&#x27;s execution.
3276 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
3277 # Should only be used with RunBuildTrigger
3278 &quot;a_key&quot;: &quot;A String&quot;,
3279 },
3280 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
3281 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
3282 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
3283 # regex.
3284 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
3285 #
3286 # The syntax of the regular expressions accepted is the syntax accepted by
3287 # RE2 and described at https://github.com/google/re2/wiki/Syntax
3288 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
3289 # project ID requesting the build is assumed.
3290 },
3291 },
3292 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
3293 &quot;A String&quot;,
3294 ],
3295 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
3296 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
3297 #
3298 # Each volume is created as an empty volume prior to starting the build
3299 # process. Upon completion of the build, volumes and their contents are
3300 # discarded. Global volume names and paths cannot conflict with the volumes
3301 # defined a build step.
3302 #
3303 # Using a global volume in a build with only one step is not valid as
3304 # it is indicative of a build request with an incorrect configuration.
3305 { # Volume describes a Docker container volume which is mounted into build steps
3306 # in order to persist files across build step execution.
3307 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
3308 #
3309 # Paths must be absolute and cannot conflict with other volume paths on the
3310 # same build step or with certain reserved volume paths.
3311 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
3312 #
3313 # Volume names must be unique per build step and must be valid names for
3314 # Docker volumes. Each named volume must be used by at least two build steps.
3315 },
3316 ],
3317 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
3318 # build steps in this build. If a variable is defined in both globally and in
3319 # a build step, the variable will use the build step value.
3320 #
3321 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
3322 # being given the value &quot;VALUE&quot;.
3323 &quot;A String&quot;,
3324 ],
3325 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
3326 &quot;A String&quot;,
3327 ],
3328 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
3329 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
3330 # Storage.
3331 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
3332 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
3333 # checks.
3334 #
3335 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
3336 # be overridden in the build configuration file.
3337 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
3338 # &quot;disk free&quot;; some of the space will be used by the operating system and
3339 # build utilities. Also note that this is the minimum disk size that will be
3340 # allocated for the build -- the build may run with a larger disk than
3341 # requested. At present, the maximum disk size is 1000GB; builds that request
3342 # more than the maximum are rejected with an error.
3343 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
3344 # Format: projects/{project}/workerPools/{workerPool}
3345 #
3346 # This field is experimental.
3347 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
3348 # logs are stored.
3349 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
3350 # Key Management Service crypto key. These values must be specified in the
3351 # build&#x27;s `Secret`. These variables will be available to all build steps
3352 # in this build.
3353 &quot;A String&quot;,
3354 ],
3355 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
3356 # operations to the substitutions.
3357 #
3358 # NOTE: this is always enabled for triggered builds and cannot be
3359 # overridden in the build configuration file.
3360 },
3361 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
3362 &quot;a_key&quot;: &quot;A String&quot;,
3363 },
3364 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
3365 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
3366 },
3367 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using
3368 # https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;.
3369 #
3370 # If ignored_files and changed files are both empty, then they are
3371 # not used to determine whether or not to trigger a build.
3372 #
3373 # If ignored_files is not empty, then we ignore any files that match
3374 # any of the ignored_file globs. If the change has no files that are
3375 # outside of the ignored_files globs, then we do not trigger a build.
3376 &quot;A String&quot;,
3377 ],
3378 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to a file whose contents is used for the
3379 # template.
3380 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
3381 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project.
3382 # Trigger names must meet the following requirements:
3383 #
3384 # + They must contain only alphanumeric characters and dashes.
3385 # + They can be 1-64 characters long.
3386 # + They must begin and end with an alphanumeric character.
3387 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
3388 &quot;A String&quot;,
3389 ],
3390 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates
3391 # a build whenever a GitHub event is received.
3392 #
3393 # Mutually exclusive with `trigger_template`.
3394 # build whenever a GitHub event is received.
3395 #
3396 # This message is experimental.
3397 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
3398 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests.
3399 # Requests.
3400 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match.
3401 #
3402 # The syntax of the regular expressions accepted is the syntax accepted by
3403 # RE2 and described at https://github.com/google/re2/wiki/Syntax
3404 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to
3405 # comment `/gcbrun`.
3406 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
3407 },
3408 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for
3409 # https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
3410 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for
3411 # https://github.com/googlecloudplatform/cloud-builders is
3412 # &quot;googlecloudplatform&quot;.
3413 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
3414 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build.
3415 #
3416 # The syntax of the regular expressions accepted is the syntax accepted by
3417 # RE2 and described at https://github.com/google/re2/wiki/Syntax
3418 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the
3419 # git_ref regex.
3420 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build.
3421 #
3422 # The syntax of the regular expressions accepted is the syntax accepted by
3423 # RE2 and described at https://github.com/google/re2/wiki/Syntax
3424 },
3425 },
3426 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
3427 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files
3428 # filter and included_files is empty, then as far as this filter is
3429 # concerned, we should trigger the build.
3430 #
3431 # If any of the files altered in the commit pass the ignored_files
3432 # filter and included_files is not empty, then we make sure that at
3433 # least one of those files matches a included_files glob. If not,
3434 # then we do not trigger a build.
3435 &quot;A String&quot;,
3436 ],
3437 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
3438 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003439</div>
3440
3441<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003442 <code class="details" id="run">run(projectId, triggerId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003443 <pre>Runs a `BuildTrigger` at a particular source revision.
3444
3445Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003446 projectId: string, Required. ID of the project. (required)
3447 triggerId: string, Required. ID of the trigger. (required)
3448 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003449 The object takes the form of:
3450
3451{ # Location of the source in a Google Cloud Source Repository.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003452 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Dan O'Mearadd494642020-05-01 07:42:23 -07003453 #
3454 # The syntax of the regular expressions accepted is the syntax accepted by
3455 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003456 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
3457 #
3458 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
3459 # absolute path, this value is ignored for that step&#x27;s execution.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003460 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
3461 # Should only be used with RunBuildTrigger
3462 &quot;a_key&quot;: &quot;A String&quot;,
3463 },
3464 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
3465 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
3466 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
3467 # regex.
3468 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Dan O'Mearadd494642020-05-01 07:42:23 -07003469 #
3470 # The syntax of the regular expressions accepted is the syntax accepted by
3471 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim65020912020-05-20 12:08:20 -07003472 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
3473 # project ID requesting the build is assumed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003474}
3475
3476 x__xgafv: string, V1 error format.
3477 Allowed values
3478 1 - v1 error format
3479 2 - v2 error format
3480
3481Returns:
3482 An object of the form:
3483
3484 { # This resource represents a long-running operation that is the result of a
3485 # network API call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003486 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
3487 # method returns no data on success, such as `Delete`, the response is
3488 # `google.protobuf.Empty`. If the original method is standard
3489 # `Get`/`Create`/`Update`, the response should be the resource. For other
3490 # methods, the response should have the type `XxxResponse`, where `Xxx`
3491 # is the original method name. For example, if the original method name
3492 # is `TakeSnapshot()`, the inferred response type is
3493 # `TakeSnapshotResponse`.
3494 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3495 },
3496 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
3497 # contains progress information and common metadata such as create time.
3498 # Some services might not provide such metadata. Any method that returns a
3499 # long-running operation should document the metadata type, if any.
3500 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3501 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003502 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
3503 # originally returns it. If you use the default HTTP mapping, the
3504 # `name` should be a resource name ending with `operations/{unique_id}`.
3505 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
3506 # different programming environments, including REST APIs and RPC APIs. It is
3507 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3508 # three pieces of data: error code, error message, and error details.
3509 #
3510 # You can find out more about this error model and how to work with it in the
3511 # [API Design Guide](https://cloud.google.com/apis/design/errors).
3512 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
3513 # user-facing error message should be localized and sent in the
3514 # google.rpc.Status.details field, or localized by the client.
3515 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3516 # message types for APIs to use.
3517 {
3518 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3519 },
3520 ],
3521 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3522 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003523 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003524 # If `true`, the operation is completed, and either `error` or `response` is
3525 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003526 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003527</div>
3528
3529</body></html>