blob: a026d5989db4eb70851517380fce454d8e8b3ad2 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -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.builds.html">builds</a></h1>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#cancel">cancel(projectId, id, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Cancels a build in progress.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070082<p class="firstline">Starts a build with the specified configuration.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, id, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns information about a previously requested build.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(projectId, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Lists previously requested builds.</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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#retry">retry(projectId, id, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Creates a new build based on the specified build.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070095<h3>Method Details</h3>
96<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097 <code class="details" id="cancel">cancel(projectId, id, body=None, x__xgafv=None)</code>
98 <pre>Cancels a build in progress.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070099
100Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 projectId: string, Required. ID of the project. (required)
102 id: string, Required. ID of the build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700104 The object takes the form of:
105
106{ # Request to cancel an ongoing build.
107 }
108
109 x__xgafv: string, V1 error format.
110 Allowed values
111 1 - v1 error format
112 2 - v2 error format
113
114Returns:
115 An object of the form:
116
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 { # A build resource in the Cloud Build API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700118 #
119 # At a high level, a `Build` describes where to find source code, how to build
120 # it (for example, the builder image to run on the source), and where to store
121 # the built artifacts.
122 #
123 # Fields can include the following variables, which will be expanded when the
124 # build is created:
125 #
126 # - $PROJECT_ID: the project ID of the build.
127 # - $BUILD_ID: the autogenerated ID of the build.
128 # - $REPO_NAME: the source repository name specified by RepoSource.
129 # - $BRANCH_NAME: the branch name specified by RepoSource.
130 # - $TAG_NAME: the tag name specified by RepoSource.
131 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
132 # resolved from the specified branch or tag.
133 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
134 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
135 # than this value, the build will expire and the build status will be
136 # `EXPIRED`.
137 #
138 # The TTL starts ticking from create_time.
139 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
140 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
141 # some source was used for this build.
142 &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
143 # revisions resolved.
144 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
145 #
146 # The syntax of the regular expressions accepted is the syntax accepted by
147 # RE2 and described at https://github.com/google/re2/wiki/Syntax
148 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
149 #
150 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
151 # absolute path, this value is ignored for that step&#x27;s execution.
152 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
153 # Should only be used with RunBuildTrigger
154 &quot;a_key&quot;: &quot;A String&quot;,
155 },
156 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
157 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
158 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
159 # regex.
160 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
161 #
162 # The syntax of the regular expressions accepted is the syntax accepted by
163 # RE2 and described at https://github.com/google/re2/wiki/Syntax
164 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
165 # project ID requesting the build is assumed.
166 },
167 &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
168 # generations resolved.
169 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
170 # omitted, the latest generation will be used.
171 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
172 # [Bucket Name
173 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
174 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
175 #
176 # This object must be a gzipped archive file (`.tar.gz`) containing source to
177 # build.
178 },
179 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
180 # the original source integrity was maintained in the build. Note that
181 # `FileHashes` will only be populated if `BuildOptions` has requested a
182 # `SourceProvenanceHash`.
183 #
184 # The keys to this map are file paths used as build source and the values
185 # contain the hash values for those files.
186 #
187 # If the build source came in a single package such as a gzipped tarfile
188 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
189 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
190 # SourceProvenance messages to verify integrity of source input to the build.
191 &quot;fileHash&quot;: [ # Collection of file hashes.
192 { # Container message for hash values.
193 &quot;value&quot;: &quot;A String&quot;, # The hash value.
194 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
195 },
196 ],
197 },
198 },
199 },
200 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
201 { # Pairs a set of secret environment variables containing encrypted
202 # values with the Cloud KMS key to use to decrypt the value.
203 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
204 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
205 #
206 # Secret environment variables must be unique across all of a build&#x27;s
207 # secrets, and must be used by at least one build step. Values can be at most
208 # 64 KB in size. There can be at most 100 secret values across all of a
209 # build&#x27;s secrets.
210 &quot;a_key&quot;: &quot;A String&quot;,
211 },
212 },
213 ],
214 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
215 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
216 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
217 # indices.
218 &quot;A String&quot;,
219 ],
220 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
221 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
222 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
223 },
224 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
225 &quot;images&quot;: [ # Container images that were built as a part of the build.
226 { # An image built by the pipeline.
227 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
228 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
229 # presented to `docker push`.
230 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
231 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
232 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
233 },
234 },
235 ],
236 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
237 # corresponding to build step indices.
238 #
239 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
240 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
241 # Only the first 4KB of data is stored.
242 &quot;A String&quot;,
243 ],
244 },
245 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
246 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
247 # are:
248 #
249 # * BUILD: time to execute all build steps
250 # * PUSH: time to push all specified images.
251 # * FETCHSOURCE: time to fetch source.
252 #
253 # If the build does not specify source or images,
254 # these keys will not be included.
255 &quot;a_key&quot;: { # Start and end times for a build execution phase.
256 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
257 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
258 },
259 },
260 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
261 #
262 # The difference between finish_time and start_time is the duration of the
263 # build&#x27;s execution.
264 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
265 # was triggered automatically.
266 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
267 # granularity. If this amount of time elapses, work on the build will cease
268 # and the build status will be `TIMEOUT`.
269 #
270 # `timeout` starts ticking from `startTime`.
271 #
272 # Default time is ten minutes.
273 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
274 # successful completion of all build steps.
275 # successful completion of all build steps.
276 &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
277 # completion of all build steps.
278 #
279 # Files in the workspace matching specified paths globs will be uploaded to
280 # the specified Cloud Storage location using the builder service account&#x27;s
281 # credentials.
282 #
283 # The location and generation of the uploaded objects will be stored in the
284 # Build resource&#x27;s results field.
285 #
286 # If any objects fail to be pushed, the build is marked FAILURE.
287 # completion of all build steps.
288 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
289 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
290 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
291 #
292 # Files in the workspace matching any path pattern will be uploaded to
293 # Cloud Storage with this location as a prefix.
294 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
295 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
296 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
297 },
298 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
299 &quot;A String&quot;,
300 ],
301 },
302 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
303 # steps.
304 #
305 # The images will be pushed using the builder service account&#x27;s credentials.
306 #
307 # The digests of the pushed images will be stored in the Build resource&#x27;s
308 # results field.
309 #
310 # If any of the images fail to be pushed, the build is marked FAILURE.
311 &quot;A String&quot;,
312 ],
313 },
314 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
315 # [Bucket Name
316 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
317 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
318 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
319 { # A step in the build pipeline.
320 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
321 #
322 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
323 # are used as arguments to that entrypoint. If the image does not define
324 # an entrypoint, the first element in args is used as the entrypoint,
325 # and the remainder will be used as arguments.
326 &quot;A String&quot;,
327 ],
328 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
329 # If unset, the image&#x27;s default entrypoint is used.
330 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
331 # Management Service crypto key. These values must be specified in the
332 # build&#x27;s `Secret`.
333 &quot;A String&quot;,
334 ],
335 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
336 # only updated on build completion; step status is not updated in real-time
337 # as the build progresses.
338 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
339 #
340 # Each volume is created as an empty volume prior to execution of the
341 # build step. Upon completion of the build, volumes and their contents are
342 # discarded.
343 #
344 # Using a named volume in only one step is not valid as it is indicative
345 # of a build request with an incorrect configuration.
346 { # Volume describes a Docker container volume which is mounted into build steps
347 # in order to persist files across build step execution.
348 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
349 #
350 # Paths must be absolute and cannot conflict with other volume paths on the
351 # same build step or with certain reserved volume paths.
352 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
353 #
354 # Volume names must be unique per build step and must be valid names for
355 # Docker volumes. Each named volume must be used by at least two build steps.
356 },
357 ],
358 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
359 # time limit and will be allowed to continue to run until either it completes
360 # or the build itself times out.
361 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
362 #
363 # If this value is a relative path, it is relative to the build&#x27;s working
364 # directory. If this value is absolute, it may be outside the build&#x27;s working
365 # directory, in which case the contents of the path may not be persisted
366 # across build step executions, unless a `volume` for that path is specified.
367 #
368 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
369 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
370 # the step&#x27;s execution.
371 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
372 # reference this build step as a dependency.
373 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
374 #
375 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
376 # being given the value &quot;VALUE&quot;.
377 &quot;A String&quot;,
378 ],
379 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
380 # This build step will not start until all the build steps in `wait_for`
381 # have completed successfully. If `wait_for` is empty, this build step will
382 # start when all previous build steps in the `Build.Steps` list have
383 # completed successfully.
384 &quot;A String&quot;,
385 ],
386 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
387 # build step.
388 #
389 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
390 # will be run directly. If not, the host will attempt to pull the image
391 # first, using the builder service account&#x27;s credentials if necessary.
392 #
393 # The Docker daemon&#x27;s cache will already have the latest versions of all of
394 # the officially supported build steps
395 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
396 # The Docker daemon will also have cached many of the layers for some popular
397 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
398 # attempt to use them.
399 #
400 # If you built an image in a previous build step, it will be stored in the
401 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
402 # later build step.
403 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
404 # builder image only.
405 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
406 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
407 },
408 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
409 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
410 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
411 },
412 },
413 ],
414 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
415 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
416 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
417 # steps.
418 #
419 # The images are pushed using the builder service account&#x27;s credentials.
420 #
421 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
422 # results field.
423 #
424 # If any of the images fail to be pushed, the build status is marked
425 # `FAILURE`.
426 &quot;A String&quot;,
427 ],
428 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
429 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
430 &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.
431 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
432 # omitted, the latest generation will be used.
433 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
434 # [Bucket Name
435 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
436 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
437 #
438 # This object must be a gzipped archive file (`.tar.gz`) containing source to
439 # build.
440 },
441 &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
442 # Repository.
443 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
444 #
445 # The syntax of the regular expressions accepted is the syntax accepted by
446 # RE2 and described at https://github.com/google/re2/wiki/Syntax
447 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
448 #
449 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
450 # absolute path, this value is ignored for that step&#x27;s execution.
451 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
452 # Should only be used with RunBuildTrigger
453 &quot;a_key&quot;: &quot;A String&quot;,
454 },
455 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
456 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
457 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
458 # regex.
459 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
460 #
461 # The syntax of the regular expressions accepted is the syntax accepted by
462 # RE2 and described at https://github.com/google/re2/wiki/Syntax
463 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
464 # project ID requesting the build is assumed.
465 },
466 },
467 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
468 &quot;A String&quot;,
469 ],
470 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
471 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
472 #
473 # Each volume is created as an empty volume prior to starting the build
474 # process. Upon completion of the build, volumes and their contents are
475 # discarded. Global volume names and paths cannot conflict with the volumes
476 # defined a build step.
477 #
478 # Using a global volume in a build with only one step is not valid as
479 # it is indicative of a build request with an incorrect configuration.
480 { # Volume describes a Docker container volume which is mounted into build steps
481 # in order to persist files across build step execution.
482 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
483 #
484 # Paths must be absolute and cannot conflict with other volume paths on the
485 # same build step or with certain reserved volume paths.
486 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
487 #
488 # Volume names must be unique per build step and must be valid names for
489 # Docker volumes. Each named volume must be used by at least two build steps.
490 },
491 ],
492 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
493 # build steps in this build. If a variable is defined in both globally and in
494 # a build step, the variable will use the build step value.
495 #
496 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
497 # being given the value &quot;VALUE&quot;.
498 &quot;A String&quot;,
499 ],
500 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
501 &quot;A String&quot;,
502 ],
503 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
504 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
505 # Storage.
506 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
507 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
508 # checks.
509 #
510 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
511 # be overridden in the build configuration file.
512 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
513 # &quot;disk free&quot;; some of the space will be used by the operating system and
514 # build utilities. Also note that this is the minimum disk size that will be
515 # allocated for the build -- the build may run with a larger disk than
516 # requested. At present, the maximum disk size is 1000GB; builds that request
517 # more than the maximum are rejected with an error.
518 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
519 # Format: projects/{project}/workerPools/{workerPool}
520 #
521 # This field is experimental.
522 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
523 # logs are stored.
524 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
525 # Key Management Service crypto key. These values must be specified in the
526 # build&#x27;s `Secret`. These variables will be available to all build steps
527 # in this build.
528 &quot;A String&quot;,
529 ],
530 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
531 # operations to the substitutions.
532 #
533 # NOTE: this is always enabled for triggered builds and cannot be
534 # overridden in the build configuration file.
535 },
536 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
537 &quot;a_key&quot;: &quot;A String&quot;,
538 },
539 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
540 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
541 }</pre>
542</div>
543
544<div class="method">
545 <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code>
546 <pre>Starts a build with the specified configuration.
547
548This method returns a long-running `Operation`, which includes the build
549ID. Pass the build ID to `GetBuild` to determine the build status (such as
550`SUCCESS` or `FAILURE`).
551
552Args:
553 projectId: string, Required. ID of the project. (required)
554 body: object, The request body.
555 The object takes the form of:
556
557{ # A build resource in the Cloud Build API.
558 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 # At a high level, a `Build` describes where to find source code, how to build
560 # it (for example, the builder image to run on the source), and where to store
561 # the built artifacts.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700562 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700564 # build is created:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700565 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700566 # - $PROJECT_ID: the project ID of the build.
567 # - $BUILD_ID: the autogenerated ID of the build.
568 # - $REPO_NAME: the source repository name specified by RepoSource.
569 # - $BRANCH_NAME: the branch name specified by RepoSource.
570 # - $TAG_NAME: the tag name specified by RepoSource.
571 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
572 # resolved from the specified branch or tag.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700574 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
575 # than this value, the build will expire and the build status will be
576 # `EXPIRED`.
577 #
578 # The TTL starts ticking from create_time.
579 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700580 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
581 # some source was used for this build.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700582 &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
583 # revisions resolved.
584 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
585 #
586 # The syntax of the regular expressions accepted is the syntax accepted by
587 # RE2 and described at https://github.com/google/re2/wiki/Syntax
588 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
589 #
590 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
591 # absolute path, this value is ignored for that step&#x27;s execution.
592 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
593 # Should only be used with RunBuildTrigger
594 &quot;a_key&quot;: &quot;A String&quot;,
595 },
596 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
597 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
598 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
599 # regex.
600 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
601 #
602 # The syntax of the regular expressions accepted is the syntax accepted by
603 # RE2 and described at https://github.com/google/re2/wiki/Syntax
604 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
605 # project ID requesting the build is assumed.
606 },
607 &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
608 # generations resolved.
609 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
610 # omitted, the latest generation will be used.
611 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
612 # [Bucket Name
613 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
614 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
615 #
616 # This object must be a gzipped archive file (`.tar.gz`) containing source to
617 # build.
618 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700619 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
620 # the original source integrity was maintained in the build. Note that
621 # `FileHashes` will only be populated if `BuildOptions` has requested a
622 # `SourceProvenanceHash`.
623 #
624 # The keys to this map are file paths used as build source and the values
625 # contain the hash values for those files.
626 #
627 # If the build source came in a single package such as a gzipped tarfile
628 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
629 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
630 # SourceProvenance messages to verify integrity of source input to the build.
631 &quot;fileHash&quot;: [ # Collection of file hashes.
632 { # Container message for hash values.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700633 &quot;value&quot;: &quot;A String&quot;, # The hash value.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700634 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700635 },
636 ],
637 },
638 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700639 },
640 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
641 { # Pairs a set of secret environment variables containing encrypted
642 # values with the Cloud KMS key to use to decrypt the value.
643 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
644 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700645 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700646 # Secret environment variables must be unique across all of a build&#x27;s
647 # secrets, and must be used by at least one build step. Values can be at most
648 # 64 KB in size. There can be at most 100 secret values across all of a
649 # build&#x27;s secrets.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700650 &quot;a_key&quot;: &quot;A String&quot;,
651 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700652 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700653 ],
654 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
655 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
656 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
657 # indices.
658 &quot;A String&quot;,
659 ],
660 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
661 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
662 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
663 },
664 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
665 &quot;images&quot;: [ # Container images that were built as a part of the build.
666 { # An image built by the pipeline.
667 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
668 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
669 # presented to `docker push`.
670 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
671 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
672 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
673 },
674 },
675 ],
676 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
677 # corresponding to build step indices.
678 #
679 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
680 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
681 # Only the first 4KB of data is stored.
682 &quot;A String&quot;,
683 ],
684 },
685 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
686 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
687 # are:
688 #
689 # * BUILD: time to execute all build steps
690 # * PUSH: time to push all specified images.
691 # * FETCHSOURCE: time to fetch source.
692 #
693 # If the build does not specify source or images,
694 # these keys will not be included.
695 &quot;a_key&quot;: { # Start and end times for a build execution phase.
696 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
697 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700698 },
699 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700700 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
701 #
702 # The difference between finish_time and start_time is the duration of the
703 # build&#x27;s execution.
704 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
705 # was triggered automatically.
706 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
707 # granularity. If this amount of time elapses, work on the build will cease
708 # and the build status will be `TIMEOUT`.
709 #
710 # `timeout` starts ticking from `startTime`.
711 #
712 # Default time is ten minutes.
713 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
714 # successful completion of all build steps.
715 # successful completion of all build steps.
716 &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
717 # completion of all build steps.
718 #
719 # Files in the workspace matching specified paths globs will be uploaded to
720 # the specified Cloud Storage location using the builder service account&#x27;s
721 # credentials.
722 #
723 # The location and generation of the uploaded objects will be stored in the
724 # Build resource&#x27;s results field.
725 #
726 # If any objects fail to be pushed, the build is marked FAILURE.
727 # completion of all build steps.
728 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
729 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
730 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
731 #
732 # Files in the workspace matching any path pattern will be uploaded to
733 # Cloud Storage with this location as a prefix.
734 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
735 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
736 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
737 },
738 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
739 &quot;A String&quot;,
740 ],
741 },
742 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
743 # steps.
744 #
745 # The images will be pushed using the builder service account&#x27;s credentials.
746 #
747 # The digests of the pushed images will be stored in the Build resource&#x27;s
748 # results field.
749 #
750 # If any of the images fail to be pushed, the build is marked FAILURE.
751 &quot;A String&quot;,
752 ],
753 },
754 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
755 # [Bucket Name
756 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
757 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
758 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
759 { # A step in the build pipeline.
760 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
761 #
762 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
763 # are used as arguments to that entrypoint. If the image does not define
764 # an entrypoint, the first element in args is used as the entrypoint,
765 # and the remainder will be used as arguments.
766 &quot;A String&quot;,
767 ],
768 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
769 # If unset, the image&#x27;s default entrypoint is used.
770 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
771 # Management Service crypto key. These values must be specified in the
772 # build&#x27;s `Secret`.
773 &quot;A String&quot;,
774 ],
775 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
776 # only updated on build completion; step status is not updated in real-time
777 # as the build progresses.
778 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
779 #
780 # Each volume is created as an empty volume prior to execution of the
781 # build step. Upon completion of the build, volumes and their contents are
782 # discarded.
783 #
784 # Using a named volume in only one step is not valid as it is indicative
785 # of a build request with an incorrect configuration.
786 { # Volume describes a Docker container volume which is mounted into build steps
787 # in order to persist files across build step execution.
788 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
789 #
790 # Paths must be absolute and cannot conflict with other volume paths on the
791 # same build step or with certain reserved volume paths.
792 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
793 #
794 # Volume names must be unique per build step and must be valid names for
795 # Docker volumes. Each named volume must be used by at least two build steps.
796 },
797 ],
798 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
799 # time limit and will be allowed to continue to run until either it completes
800 # or the build itself times out.
801 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
802 #
803 # If this value is a relative path, it is relative to the build&#x27;s working
804 # directory. If this value is absolute, it may be outside the build&#x27;s working
805 # directory, in which case the contents of the path may not be persisted
806 # across build step executions, unless a `volume` for that path is specified.
807 #
808 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
809 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
810 # the step&#x27;s execution.
811 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
812 # reference this build step as a dependency.
813 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
814 #
815 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
816 # being given the value &quot;VALUE&quot;.
817 &quot;A String&quot;,
818 ],
819 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
820 # This build step will not start until all the build steps in `wait_for`
821 # have completed successfully. If `wait_for` is empty, this build step will
822 # start when all previous build steps in the `Build.Steps` list have
823 # completed successfully.
824 &quot;A String&quot;,
825 ],
826 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
827 # build step.
828 #
829 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
830 # will be run directly. If not, the host will attempt to pull the image
831 # first, using the builder service account&#x27;s credentials if necessary.
832 #
833 # The Docker daemon&#x27;s cache will already have the latest versions of all of
834 # the officially supported build steps
835 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
836 # The Docker daemon will also have cached many of the layers for some popular
837 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
838 # attempt to use them.
839 #
840 # If you built an image in a previous build step, it will be stored in the
841 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
842 # later build step.
843 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
844 # builder image only.
845 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
846 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
847 },
848 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
849 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
850 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
851 },
852 },
853 ],
854 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
855 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 # steps.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700858 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 # The images are pushed using the builder service account&#x27;s credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700860 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700861 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700862 # results field.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700863 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 # If any of the images fail to be pushed, the build status is marked
865 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700870 &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.
871 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
872 # omitted, the latest generation will be used.
873 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
874 # [Bucket Name
875 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
876 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
877 #
878 # This object must be a gzipped archive file (`.tar.gz`) containing source to
879 # build.
880 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &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
882 # Repository.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700883 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700884 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 # The syntax of the regular expressions accepted is the syntax accepted by
886 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700887 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
888 #
889 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
890 # absolute path, this value is ignored for that step&#x27;s execution.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700891 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
892 # Should only be used with RunBuildTrigger
893 &quot;a_key&quot;: &quot;A String&quot;,
894 },
895 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
896 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
897 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
898 # regex.
899 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 # The syntax of the regular expressions accepted is the syntax accepted by
902 # RE2 and described at https://github.com/google/re2/wiki/Syntax
903 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
904 # project ID requesting the build is assumed.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700905 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700907 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
908 &quot;A String&quot;,
909 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 #
913 # Each volume is created as an empty volume prior to starting the build
914 # process. Upon completion of the build, volumes and their contents are
915 # discarded. Global volume names and paths cannot conflict with the volumes
916 # defined a build step.
917 #
918 # Using a global volume in a build with only one step is not valid as
919 # it is indicative of a build request with an incorrect configuration.
920 { # Volume describes a Docker container volume which is mounted into build steps
921 # in order to persist files across build step execution.
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 #
924 # Paths must be absolute and cannot conflict with other volume paths on the
925 # same build step or with certain reserved volume paths.
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 #
928 # Volume names must be unique per build step and must be valid names for
929 # Docker volumes. Each named volume must be used by at least two build steps.
930 },
931 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700932 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
933 # build steps in this build. If a variable is defined in both globally and in
934 # a build step, the variable will use the build step value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700935 #
936 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
937 # being given the value &quot;VALUE&quot;.
938 &quot;A String&quot;,
939 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700940 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
941 &quot;A String&quot;,
942 ],
943 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
944 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
945 # Storage.
946 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
947 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
948 # checks.
949 #
950 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
951 # be overridden in the build configuration file.
952 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
953 # &quot;disk free&quot;; some of the space will be used by the operating system and
954 # build utilities. Also note that this is the minimum disk size that will be
955 # allocated for the build -- the build may run with a larger disk than
956 # requested. At present, the maximum disk size is 1000GB; builds that request
957 # more than the maximum are rejected with an error.
958 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
959 # Format: projects/{project}/workerPools/{workerPool}
960 #
961 # This field is experimental.
962 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
963 # logs are stored.
964 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
965 # Key Management Service crypto key. These values must be specified in the
966 # build&#x27;s `Secret`. These variables will be available to all build steps
967 # in this build.
968 &quot;A String&quot;,
969 ],
970 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
971 # operations to the substitutions.
972 #
973 # NOTE: this is always enabled for triggered builds and cannot be
974 # overridden in the build configuration file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700976 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
977 &quot;a_key&quot;: &quot;A String&quot;,
978 },
979 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
980 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
981 }
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700982
983 x__xgafv: string, V1 error format.
984 Allowed values
985 1 - v1 error format
986 2 - v2 error format
987
988Returns:
989 An object of the form:
990
991 { # This resource represents a long-running operation that is the result of a
992 # network API call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700993 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
994 # method returns no data on success, such as `Delete`, the response is
995 # `google.protobuf.Empty`. If the original method is standard
996 # `Get`/`Create`/`Update`, the response should be the resource. For other
997 # methods, the response should have the type `XxxResponse`, where `Xxx`
998 # is the original method name. For example, if the original method name
999 # is `TakeSnapshot()`, the inferred response type is
1000 # `TakeSnapshotResponse`.
1001 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1002 },
1003 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1004 # contains progress information and common metadata such as create time.
1005 # Some services might not provide such metadata. Any method that returns a
1006 # long-running operation should document the metadata type, if any.
1007 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1008 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001009 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1010 # originally returns it. If you use the default HTTP mapping, the
1011 # `name` should be a resource name ending with `operations/{unique_id}`.
1012 &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.
1013 # different programming environments, including REST APIs and RPC APIs. It is
1014 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1015 # three pieces of data: error code, error message, and error details.
1016 #
1017 # You can find out more about this error model and how to work with it in the
1018 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1019 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1020 # user-facing error message should be localized and sent in the
1021 # google.rpc.Status.details field, or localized by the client.
1022 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1023 # message types for APIs to use.
1024 {
1025 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1026 },
1027 ],
1028 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1029 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001030 &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 -07001031 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001032 # available.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001033 }</pre>
1034</div>
1035
1036<div class="method">
1037 <code class="details" id="get">get(projectId, id, x__xgafv=None)</code>
1038 <pre>Returns information about a previously requested build.
1039
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040The `Build` that is returned includes its status (such as `SUCCESS`,
1041`FAILURE`, or `WORKING`), and timing information.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001042
1043Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 projectId: string, Required. ID of the project. (required)
1045 id: string, Required. ID of the build. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001046 x__xgafv: string, V1 error format.
1047 Allowed values
1048 1 - v1 error format
1049 2 - v2 error format
1050
1051Returns:
1052 An object of the form:
1053
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 { # A build resource in the Cloud Build API.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001055 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001056 # At a high level, a `Build` describes where to find source code, how to build
1057 # it (for example, the builder image to run on the source), and where to store
1058 # the built artifacts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001059 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001060 # Fields can include the following variables, which will be expanded when the
1061 # build is created:
1062 #
1063 # - $PROJECT_ID: the project ID of the build.
1064 # - $BUILD_ID: the autogenerated ID of the build.
1065 # - $REPO_NAME: the source repository name specified by RepoSource.
1066 # - $BRANCH_NAME: the branch name specified by RepoSource.
1067 # - $TAG_NAME: the tag name specified by RepoSource.
1068 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1069 # resolved from the specified branch or tag.
1070 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1071 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
1072 # than this value, the build will expire and the build status will be
1073 # `EXPIRED`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001074 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001075 # The TTL starts ticking from create_time.
1076 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1077 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1078 # some source was used for this build.
1079 &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
1080 # revisions resolved.
1081 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001083 # The syntax of the regular expressions accepted is the syntax accepted by
1084 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1085 &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 -07001086 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001087 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1088 # absolute path, this value is ignored for that step&#x27;s execution.
1089 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1090 # Should only be used with RunBuildTrigger
1091 &quot;a_key&quot;: &quot;A String&quot;,
1092 },
1093 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1094 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1095 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1096 # regex.
1097 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1098 #
1099 # The syntax of the regular expressions accepted is the syntax accepted by
1100 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1101 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1102 # project ID requesting the build is assumed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001103 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001104 &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
1105 # generations resolved.
1106 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1107 # omitted, the latest generation will be used.
1108 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1109 # [Bucket Name
1110 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1111 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1112 #
1113 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1114 # build.
Bu Sun Kim65020912020-05-20 12:08:20 -07001115 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001116 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
1117 # the original source integrity was maintained in the build. Note that
1118 # `FileHashes` will only be populated if `BuildOptions` has requested a
1119 # `SourceProvenanceHash`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001120 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001121 # The keys to this map are file paths used as build source and the values
1122 # contain the hash values for those files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001123 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001124 # If the build source came in a single package such as a gzipped tarfile
1125 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1126 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
1127 # SourceProvenance messages to verify integrity of source input to the build.
1128 &quot;fileHash&quot;: [ # Collection of file hashes.
1129 { # Container message for hash values.
1130 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1131 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1132 },
1133 ],
1134 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001135 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001137 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
1138 { # Pairs a set of secret environment variables containing encrypted
1139 # values with the Cloud KMS key to use to decrypt the value.
1140 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1141 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
1142 #
1143 # Secret environment variables must be unique across all of a build&#x27;s
1144 # secrets, and must be used by at least one build step. Values can be at most
1145 # 64 KB in size. There can be at most 100 secret values across all of a
1146 # build&#x27;s secrets.
1147 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001148 },
1149 },
1150 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001151 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1152 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1153 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
1154 # indices.
1155 &quot;A String&quot;,
1156 ],
1157 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1158 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1159 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1160 },
1161 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1162 &quot;images&quot;: [ # Container images that were built as a part of the build.
1163 { # An image built by the pipeline.
1164 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1165 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
1166 # presented to `docker push`.
1167 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1168 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1169 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1170 },
1171 },
1172 ],
1173 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
1174 # corresponding to build step indices.
Bu Sun Kim65020912020-05-20 12:08:20 -07001175 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001176 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1177 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1178 # Only the first 4KB of data is stored.
1179 &quot;A String&quot;,
1180 ],
1181 },
1182 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1183 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
1184 # are:
1185 #
1186 # * BUILD: time to execute all build steps
1187 # * PUSH: time to push all specified images.
1188 # * FETCHSOURCE: time to fetch source.
1189 #
1190 # If the build does not specify source or images,
1191 # these keys will not be included.
1192 &quot;a_key&quot;: { # Start and end times for a build execution phase.
1193 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1194 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1195 },
1196 },
1197 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
1198 #
1199 # The difference between finish_time and start_time is the duration of the
1200 # build&#x27;s execution.
1201 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1202 # was triggered automatically.
1203 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
1204 # granularity. If this amount of time elapses, work on the build will cease
1205 # and the build status will be `TIMEOUT`.
1206 #
1207 # `timeout` starts ticking from `startTime`.
1208 #
1209 # Default time is ten minutes.
1210 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1211 # successful completion of all build steps.
1212 # successful completion of all build steps.
1213 &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
1214 # completion of all build steps.
Bu Sun Kim65020912020-05-20 12:08:20 -07001215 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001216 # Files in the workspace matching specified paths globs will be uploaded to
1217 # the specified Cloud Storage location using the builder service account&#x27;s
1218 # credentials.
1219 #
1220 # The location and generation of the uploaded objects will be stored in the
1221 # Build resource&#x27;s results field.
1222 #
1223 # If any objects fail to be pushed, the build is marked FAILURE.
1224 # completion of all build steps.
1225 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
1226 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
1227 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1228 #
1229 # Files in the workspace matching any path pattern will be uploaded to
1230 # Cloud Storage with this location as a prefix.
1231 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1232 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1233 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1234 },
1235 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1236 &quot;A String&quot;,
1237 ],
1238 },
1239 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1240 # steps.
1241 #
1242 # The images will be pushed using the builder service account&#x27;s credentials.
1243 #
1244 # The digests of the pushed images will be stored in the Build resource&#x27;s
1245 # results field.
1246 #
1247 # If any of the images fail to be pushed, the build is marked FAILURE.
1248 &quot;A String&quot;,
1249 ],
1250 },
1251 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
1252 # [Bucket Name
1253 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1254 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1255 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1256 { # A step in the build pipeline.
1257 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
1258 #
1259 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
1260 # are used as arguments to that entrypoint. If the image does not define
1261 # an entrypoint, the first element in args is used as the entrypoint,
1262 # and the remainder will be used as arguments.
1263 &quot;A String&quot;,
1264 ],
1265 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
1266 # If unset, the image&#x27;s default entrypoint is used.
1267 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
1268 # Management Service crypto key. These values must be specified in the
1269 # build&#x27;s `Secret`.
1270 &quot;A String&quot;,
1271 ],
1272 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
1273 # only updated on build completion; step status is not updated in real-time
1274 # as the build progresses.
1275 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
1276 #
1277 # Each volume is created as an empty volume prior to execution of the
1278 # build step. Upon completion of the build, volumes and their contents are
1279 # discarded.
1280 #
1281 # Using a named volume in only one step is not valid as it is indicative
1282 # of a build request with an incorrect configuration.
1283 { # Volume describes a Docker container volume which is mounted into build steps
1284 # in order to persist files across build step execution.
1285 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1286 #
1287 # Paths must be absolute and cannot conflict with other volume paths on the
1288 # same build step or with certain reserved volume paths.
1289 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1290 #
1291 # Volume names must be unique per build step and must be valid names for
1292 # Docker volumes. Each named volume must be used by at least two build steps.
1293 },
1294 ],
1295 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
1296 # time limit and will be allowed to continue to run until either it completes
1297 # or the build itself times out.
1298 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
1299 #
1300 # If this value is a relative path, it is relative to the build&#x27;s working
1301 # directory. If this value is absolute, it may be outside the build&#x27;s working
1302 # directory, in which case the contents of the path may not be persisted
1303 # across build step executions, unless a `volume` for that path is specified.
1304 #
1305 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1306 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1307 # the step&#x27;s execution.
1308 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
1309 # reference this build step as a dependency.
1310 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
1311 #
1312 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1313 # being given the value &quot;VALUE&quot;.
1314 &quot;A String&quot;,
1315 ],
1316 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
1317 # This build step will not start until all the build steps in `wait_for`
1318 # have completed successfully. If `wait_for` is empty, this build step will
1319 # start when all previous build steps in the `Build.Steps` list have
1320 # completed successfully.
1321 &quot;A String&quot;,
1322 ],
1323 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
1324 # build step.
1325 #
1326 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
1327 # will be run directly. If not, the host will attempt to pull the image
1328 # first, using the builder service account&#x27;s credentials if necessary.
1329 #
1330 # The Docker daemon&#x27;s cache will already have the latest versions of all of
1331 # the officially supported build steps
1332 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1333 # The Docker daemon will also have cached many of the layers for some popular
1334 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
1335 # attempt to use them.
1336 #
1337 # If you built an image in a previous build step, it will be stored in the
1338 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
1339 # later build step.
1340 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
1341 # builder image only.
1342 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1343 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1344 },
1345 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1346 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1347 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1348 },
1349 },
1350 ],
1351 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1352 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1353 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1354 # steps.
1355 #
1356 # The images are pushed using the builder service account&#x27;s credentials.
1357 #
1358 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
1359 # results field.
1360 #
1361 # If any of the images fail to be pushed, the build status is marked
1362 # `FAILURE`.
1363 &quot;A String&quot;,
1364 ],
1365 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1366 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1367 &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.
1368 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1369 # omitted, the latest generation will be used.
1370 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1371 # [Bucket Name
1372 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1373 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1374 #
1375 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1376 # build.
1377 },
1378 &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
1379 # Repository.
1380 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1381 #
1382 # The syntax of the regular expressions accepted is the syntax accepted by
1383 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1384 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1385 #
1386 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1387 # absolute path, this value is ignored for that step&#x27;s execution.
1388 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1389 # Should only be used with RunBuildTrigger
1390 &quot;a_key&quot;: &quot;A String&quot;,
1391 },
1392 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1393 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1394 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1395 # regex.
1396 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1397 #
1398 # The syntax of the regular expressions accepted is the syntax accepted by
1399 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1400 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1401 # project ID requesting the build is assumed.
1402 },
1403 },
1404 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
1405 &quot;A String&quot;,
1406 ],
1407 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1408 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
1409 #
1410 # Each volume is created as an empty volume prior to starting the build
1411 # process. Upon completion of the build, volumes and their contents are
1412 # discarded. Global volume names and paths cannot conflict with the volumes
1413 # defined a build step.
1414 #
1415 # Using a global volume in a build with only one step is not valid as
1416 # it is indicative of a build request with an incorrect configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -07001417 { # Volume describes a Docker container volume which is mounted into build steps
1418 # in order to persist files across build step execution.
1419 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1420 #
1421 # Paths must be absolute and cannot conflict with other volume paths on the
1422 # same build step or with certain reserved volume paths.
1423 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1424 #
1425 # Volume names must be unique per build step and must be valid names for
1426 # Docker volumes. Each named volume must be used by at least two build steps.
1427 },
1428 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001429 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
1430 # build steps in this build. If a variable is defined in both globally and in
1431 # a build step, the variable will use the build step value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001432 #
1433 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1434 # being given the value &quot;VALUE&quot;.
1435 &quot;A String&quot;,
1436 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001437 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1438 &quot;A String&quot;,
1439 ],
1440 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1441 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
1442 # Storage.
1443 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1444 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
1445 # checks.
1446 #
1447 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
1448 # be overridden in the build configuration file.
1449 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
1450 # &quot;disk free&quot;; some of the space will be used by the operating system and
1451 # build utilities. Also note that this is the minimum disk size that will be
1452 # allocated for the build -- the build may run with a larger disk than
1453 # requested. At present, the maximum disk size is 1000GB; builds that request
1454 # more than the maximum are rejected with an error.
1455 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
1456 # Format: projects/{project}/workerPools/{workerPool}
1457 #
1458 # This field is experimental.
1459 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
1460 # logs are stored.
1461 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
1462 # Key Management Service crypto key. These values must be specified in the
1463 # build&#x27;s `Secret`. These variables will be available to all build steps
1464 # in this build.
1465 &quot;A String&quot;,
1466 ],
1467 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
1468 # operations to the substitutions.
1469 #
1470 # NOTE: this is always enabled for triggered builds and cannot be
1471 # overridden in the build configuration file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001472 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001473 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1474 &quot;a_key&quot;: &quot;A String&quot;,
1475 },
1476 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
1477 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1478 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001479</div>
1480
1481<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 <code class="details" id="list">list(projectId, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001483 <pre>Lists previously requested builds.
1484
1485Previously requested builds may still be in-progress, or may have finished
1486successfully or unsuccessfully.
1487
1488Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001489 projectId: string, Required. ID of the project. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001490 filter: string, The raw filter text to constrain the results.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001491 pageToken: string, Token to provide to skip to a particular spot in the list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001492 pageSize: integer, Number of results to return in the list.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001493 x__xgafv: string, V1 error format.
1494 Allowed values
1495 1 - v1 error format
1496 2 - v2 error format
1497
1498Returns:
1499 An object of the form:
1500
1501 { # Response including listed builds.
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to receive the next page of results.
1503 &quot;builds&quot;: [ # Builds will be sorted by `create_time`, descending.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504 { # A build resource in the Cloud Build API.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001505 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001506 # At a high level, a `Build` describes where to find source code, how to build
1507 # it (for example, the builder image to run on the source), and where to store
1508 # the built artifacts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001509 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001510 # Fields can include the following variables, which will be expanded when the
1511 # build is created:
1512 #
1513 # - $PROJECT_ID: the project ID of the build.
1514 # - $BUILD_ID: the autogenerated ID of the build.
1515 # - $REPO_NAME: the source repository name specified by RepoSource.
1516 # - $BRANCH_NAME: the branch name specified by RepoSource.
1517 # - $TAG_NAME: the tag name specified by RepoSource.
1518 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1519 # resolved from the specified branch or tag.
1520 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1521 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
1522 # than this value, the build will expire and the build status will be
1523 # `EXPIRED`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001524 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001525 # The TTL starts ticking from create_time.
1526 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1527 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1528 # some source was used for this build.
1529 &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
1530 # revisions resolved.
1531 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001533 # The syntax of the regular expressions accepted is the syntax accepted by
1534 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1535 &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 -07001536 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001537 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1538 # absolute path, this value is ignored for that step&#x27;s execution.
1539 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1540 # Should only be used with RunBuildTrigger
1541 &quot;a_key&quot;: &quot;A String&quot;,
1542 },
1543 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1544 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1545 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1546 # regex.
1547 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1548 #
1549 # The syntax of the regular expressions accepted is the syntax accepted by
1550 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1551 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1552 # project ID requesting the build is assumed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001553 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001554 &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
1555 # generations resolved.
1556 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1557 # omitted, the latest generation will be used.
1558 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1559 # [Bucket Name
1560 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1561 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1562 #
1563 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1564 # build.
Bu Sun Kim65020912020-05-20 12:08:20 -07001565 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001566 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
1567 # the original source integrity was maintained in the build. Note that
1568 # `FileHashes` will only be populated if `BuildOptions` has requested a
1569 # `SourceProvenanceHash`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001571 # The keys to this map are file paths used as build source and the values
1572 # contain the hash values for those files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001573 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001574 # If the build source came in a single package such as a gzipped tarfile
1575 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1576 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
1577 # SourceProvenance messages to verify integrity of source input to the build.
1578 &quot;fileHash&quot;: [ # Collection of file hashes.
1579 { # Container message for hash values.
1580 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1581 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1582 },
1583 ],
1584 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001585 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001586 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001587 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
1588 { # Pairs a set of secret environment variables containing encrypted
1589 # values with the Cloud KMS key to use to decrypt the value.
1590 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1591 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
1592 #
1593 # Secret environment variables must be unique across all of a build&#x27;s
1594 # secrets, and must be used by at least one build step. Values can be at most
1595 # 64 KB in size. There can be at most 100 secret values across all of a
1596 # build&#x27;s secrets.
1597 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 },
1599 },
1600 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001601 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1602 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1603 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
1604 # indices.
1605 &quot;A String&quot;,
1606 ],
1607 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1608 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1609 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1610 },
1611 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1612 &quot;images&quot;: [ # Container images that were built as a part of the build.
1613 { # An image built by the pipeline.
1614 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1615 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
1616 # presented to `docker push`.
1617 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1618 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1619 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1620 },
1621 },
1622 ],
1623 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
1624 # corresponding to build step indices.
Bu Sun Kim65020912020-05-20 12:08:20 -07001625 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001626 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1627 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1628 # Only the first 4KB of data is stored.
1629 &quot;A String&quot;,
1630 ],
1631 },
1632 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1633 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
1634 # are:
1635 #
1636 # * BUILD: time to execute all build steps
1637 # * PUSH: time to push all specified images.
1638 # * FETCHSOURCE: time to fetch source.
1639 #
1640 # If the build does not specify source or images,
1641 # these keys will not be included.
1642 &quot;a_key&quot;: { # Start and end times for a build execution phase.
1643 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1644 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1645 },
1646 },
1647 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
1648 #
1649 # The difference between finish_time and start_time is the duration of the
1650 # build&#x27;s execution.
1651 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1652 # was triggered automatically.
1653 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
1654 # granularity. If this amount of time elapses, work on the build will cease
1655 # and the build status will be `TIMEOUT`.
1656 #
1657 # `timeout` starts ticking from `startTime`.
1658 #
1659 # Default time is ten minutes.
1660 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1661 # successful completion of all build steps.
1662 # successful completion of all build steps.
1663 &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
1664 # completion of all build steps.
Bu Sun Kim65020912020-05-20 12:08:20 -07001665 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001666 # Files in the workspace matching specified paths globs will be uploaded to
1667 # the specified Cloud Storage location using the builder service account&#x27;s
1668 # credentials.
1669 #
1670 # The location and generation of the uploaded objects will be stored in the
1671 # Build resource&#x27;s results field.
1672 #
1673 # If any objects fail to be pushed, the build is marked FAILURE.
1674 # completion of all build steps.
1675 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
1676 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
1677 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1678 #
1679 # Files in the workspace matching any path pattern will be uploaded to
1680 # Cloud Storage with this location as a prefix.
1681 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1682 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1683 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1684 },
1685 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1686 &quot;A String&quot;,
1687 ],
1688 },
1689 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1690 # steps.
1691 #
1692 # The images will be pushed using the builder service account&#x27;s credentials.
1693 #
1694 # The digests of the pushed images will be stored in the Build resource&#x27;s
1695 # results field.
1696 #
1697 # If any of the images fail to be pushed, the build is marked FAILURE.
1698 &quot;A String&quot;,
1699 ],
1700 },
1701 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
1702 # [Bucket Name
1703 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1704 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1705 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1706 { # A step in the build pipeline.
1707 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
1708 #
1709 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
1710 # are used as arguments to that entrypoint. If the image does not define
1711 # an entrypoint, the first element in args is used as the entrypoint,
1712 # and the remainder will be used as arguments.
1713 &quot;A String&quot;,
1714 ],
1715 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
1716 # If unset, the image&#x27;s default entrypoint is used.
1717 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
1718 # Management Service crypto key. These values must be specified in the
1719 # build&#x27;s `Secret`.
1720 &quot;A String&quot;,
1721 ],
1722 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
1723 # only updated on build completion; step status is not updated in real-time
1724 # as the build progresses.
1725 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
1726 #
1727 # Each volume is created as an empty volume prior to execution of the
1728 # build step. Upon completion of the build, volumes and their contents are
1729 # discarded.
1730 #
1731 # Using a named volume in only one step is not valid as it is indicative
1732 # of a build request with an incorrect configuration.
1733 { # Volume describes a Docker container volume which is mounted into build steps
1734 # in order to persist files across build step execution.
1735 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1736 #
1737 # Paths must be absolute and cannot conflict with other volume paths on the
1738 # same build step or with certain reserved volume paths.
1739 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1740 #
1741 # Volume names must be unique per build step and must be valid names for
1742 # Docker volumes. Each named volume must be used by at least two build steps.
1743 },
1744 ],
1745 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
1746 # time limit and will be allowed to continue to run until either it completes
1747 # or the build itself times out.
1748 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
1749 #
1750 # If this value is a relative path, it is relative to the build&#x27;s working
1751 # directory. If this value is absolute, it may be outside the build&#x27;s working
1752 # directory, in which case the contents of the path may not be persisted
1753 # across build step executions, unless a `volume` for that path is specified.
1754 #
1755 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1756 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1757 # the step&#x27;s execution.
1758 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
1759 # reference this build step as a dependency.
1760 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
1761 #
1762 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1763 # being given the value &quot;VALUE&quot;.
1764 &quot;A String&quot;,
1765 ],
1766 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
1767 # This build step will not start until all the build steps in `wait_for`
1768 # have completed successfully. If `wait_for` is empty, this build step will
1769 # start when all previous build steps in the `Build.Steps` list have
1770 # completed successfully.
1771 &quot;A String&quot;,
1772 ],
1773 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
1774 # build step.
1775 #
1776 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
1777 # will be run directly. If not, the host will attempt to pull the image
1778 # first, using the builder service account&#x27;s credentials if necessary.
1779 #
1780 # The Docker daemon&#x27;s cache will already have the latest versions of all of
1781 # the officially supported build steps
1782 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1783 # The Docker daemon will also have cached many of the layers for some popular
1784 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
1785 # attempt to use them.
1786 #
1787 # If you built an image in a previous build step, it will be stored in the
1788 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
1789 # later build step.
1790 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
1791 # builder image only.
1792 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1793 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1794 },
1795 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1796 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1797 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1798 },
1799 },
1800 ],
1801 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1802 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1803 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1804 # steps.
1805 #
1806 # The images are pushed using the builder service account&#x27;s credentials.
1807 #
1808 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
1809 # results field.
1810 #
1811 # If any of the images fail to be pushed, the build status is marked
1812 # `FAILURE`.
1813 &quot;A String&quot;,
1814 ],
1815 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1816 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1817 &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.
1818 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1819 # omitted, the latest generation will be used.
1820 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1821 # [Bucket Name
1822 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1823 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1824 #
1825 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1826 # build.
1827 },
1828 &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
1829 # Repository.
1830 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1831 #
1832 # The syntax of the regular expressions accepted is the syntax accepted by
1833 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1834 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1835 #
1836 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1837 # absolute path, this value is ignored for that step&#x27;s execution.
1838 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1839 # Should only be used with RunBuildTrigger
1840 &quot;a_key&quot;: &quot;A String&quot;,
1841 },
1842 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1843 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1844 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1845 # regex.
1846 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1847 #
1848 # The syntax of the regular expressions accepted is the syntax accepted by
1849 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1850 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1851 # project ID requesting the build is assumed.
1852 },
1853 },
1854 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
1855 &quot;A String&quot;,
1856 ],
1857 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1858 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
1859 #
1860 # Each volume is created as an empty volume prior to starting the build
1861 # process. Upon completion of the build, volumes and their contents are
1862 # discarded. Global volume names and paths cannot conflict with the volumes
1863 # defined a build step.
1864 #
1865 # Using a global volume in a build with only one step is not valid as
1866 # it is indicative of a build request with an incorrect configuration.
Bu Sun Kim65020912020-05-20 12:08:20 -07001867 { # Volume describes a Docker container volume which is mounted into build steps
1868 # in order to persist files across build step execution.
1869 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1870 #
1871 # Paths must be absolute and cannot conflict with other volume paths on the
1872 # same build step or with certain reserved volume paths.
1873 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1874 #
1875 # Volume names must be unique per build step and must be valid names for
1876 # Docker volumes. Each named volume must be used by at least two build steps.
1877 },
1878 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001879 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
1880 # build steps in this build. If a variable is defined in both globally and in
1881 # a build step, the variable will use the build step value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001882 #
1883 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1884 # being given the value &quot;VALUE&quot;.
1885 &quot;A String&quot;,
1886 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001887 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1888 &quot;A String&quot;,
1889 ],
1890 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1891 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
1892 # Storage.
1893 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1894 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
1895 # checks.
1896 #
1897 # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
1898 # be overridden in the build configuration file.
1899 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
1900 # &quot;disk free&quot;; some of the space will be used by the operating system and
1901 # build utilities. Also note that this is the minimum disk size that will be
1902 # allocated for the build -- the build may run with a larger disk than
1903 # requested. At present, the maximum disk size is 1000GB; builds that request
1904 # more than the maximum are rejected with an error.
1905 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
1906 # Format: projects/{project}/workerPools/{workerPool}
1907 #
1908 # This field is experimental.
1909 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build
1910 # logs are stored.
1911 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
1912 # Key Management Service crypto key. These values must be specified in the
1913 # build&#x27;s `Secret`. These variables will be available to all build steps
1914 # in this build.
1915 &quot;A String&quot;,
1916 ],
1917 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string
1918 # operations to the substitutions.
1919 #
1920 # NOTE: this is always enabled for triggered builds and cannot be
1921 # overridden in the build configuration file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001922 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001923 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1924 &quot;a_key&quot;: &quot;A String&quot;,
1925 },
1926 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
1927 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1928 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001929 ],
1930 }</pre>
1931</div>
1932
1933<div class="method">
1934 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1935 <pre>Retrieves the next page of results.
1936
1937Args:
1938 previous_request: The request for the previous page. (required)
1939 previous_response: The response from the request for the previous page. (required)
1940
1941Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001942 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001943 page. Returns None if there are no more items in the collection.
1944 </pre>
1945</div>
1946
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001947<div class="method">
1948 <code class="details" id="retry">retry(projectId, id, body=None, x__xgafv=None)</code>
1949 <pre>Creates a new build based on the specified build.
1950
1951This method creates a new build using the original build request, which may
1952or may not result in an identical build.
1953
1954For triggered builds:
1955
1956* Triggered builds resolve to a precise revision; therefore a retry of a
1957triggered build will result in a build that uses the same revision.
1958
1959For non-triggered builds that specify `RepoSource`:
1960
1961* If the original build built from the tip of a branch, the retried build
1962will build from the tip of that branch, which may not be the same revision
1963as the original build.
1964* If the original build specified a commit sha or revision ID, the retried
1965build will use the identical source.
1966
1967For builds that specify `StorageSource`:
1968
1969* If the original build pulled source from Google Cloud Storage without
1970specifying the generation of the object, the new build will use the current
1971object, which may be different from the original build source.
1972* If the original build pulled source from Cloud Storage and specified the
1973generation of the object, the new build will attempt to use the same
Bu Sun Kim65020912020-05-20 12:08:20 -07001974object, which may or may not be available depending on the bucket&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001975lifecycle management settings.
1976
1977Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001978 projectId: string, Required. ID of the project. (required)
1979 id: string, Required. Build ID of the original build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 body: object, The request body.
1981 The object takes the form of:
1982
1983{ # Specifies a build to retry.
1984 }
1985
1986 x__xgafv: string, V1 error format.
1987 Allowed values
1988 1 - v1 error format
1989 2 - v2 error format
1990
1991Returns:
1992 An object of the form:
1993
1994 { # This resource represents a long-running operation that is the result of a
1995 # network API call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001996 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
1997 # method returns no data on success, such as `Delete`, the response is
1998 # `google.protobuf.Empty`. If the original method is standard
1999 # `Get`/`Create`/`Update`, the response should be the resource. For other
2000 # methods, the response should have the type `XxxResponse`, where `Xxx`
2001 # is the original method name. For example, if the original method name
2002 # is `TakeSnapshot()`, the inferred response type is
2003 # `TakeSnapshotResponse`.
2004 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2005 },
2006 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
2007 # contains progress information and common metadata such as create time.
2008 # Some services might not provide such metadata. Any method that returns a
2009 # long-running operation should document the metadata type, if any.
2010 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2011 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002012 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
2013 # originally returns it. If you use the default HTTP mapping, the
2014 # `name` should be a resource name ending with `operations/{unique_id}`.
2015 &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.
2016 # different programming environments, including REST APIs and RPC APIs. It is
2017 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2018 # three pieces of data: error code, error message, and error details.
2019 #
2020 # You can find out more about this error model and how to work with it in the
2021 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2022 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2023 # user-facing error message should be localized and sent in the
2024 # google.rpc.Status.details field, or localized by the client.
2025 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2026 # message types for APIs to use.
2027 {
2028 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2029 },
2030 ],
2031 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2032 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002033 &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 -07002034 # If `true`, the operation is completed, and either `error` or `response` is
2035 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002036 }</pre>
2037</div>
2038
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002039</body></html>