blob: 3d200e24fba7a8cdd60c37c0df3a88b982f91c69 [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 Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None, filter=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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700118 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700122 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700124 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
134 "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
135 "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
136 # corresponding to build step indices.
137 #
138 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
139 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
140 # Only the first 4KB of data is stored.
141 "A String",
142 ],
143 "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
144 "endTime": "A String", # End of time span.
145 "startTime": "A String", # Start of time span.
146 },
147 "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
148 "images": [ # Container images that were built as a part of the build.
149 { # An image built by the pipeline.
150 "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
151 "endTime": "A String", # End of time span.
152 "startTime": "A String", # Start of time span.
153 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700154 "name": "A String", # Name used to push the container image to Google Container Registry, as
155 # presented to `docker push`.
156 "digest": "A String", # Docker Registry 2.0 digest.
157 },
158 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 "buildStepImages": [ # List of build step digests, in the order corresponding to build step
160 # indices.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700161 "A String",
162 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700164 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700165 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
166 # some source was used for this build.
167 "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
168 # revisions resolved.
169 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
170 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
172 # regex.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400173 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 "substitutions": { # Substitutions to use in a triggered build.
175 # Should only be used with RunBuildTrigger
176 "a_key": "A String",
177 },
178 "repoName": "A String", # Required. Name of the Cloud Source Repository.
179 "tagName": "A String", # Regex matching tags to build.
180 #
181 # The syntax of the regular expressions accepted is the syntax accepted by
182 # RE2 and described at https://github.com/google/re2/wiki/Syntax
183 "branchName": "A String", # Regex matching branches to build.
184 #
185 # The syntax of the regular expressions accepted is the syntax accepted by
186 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 "dir": "A String", # Directory, relative to the source root, in which to run the build.
188 #
189 # This must be a relative path. If a step's `dir` is specified and is an
190 # absolute path, this value is ignored for that step's execution.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400191 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
193 # the original source integrity was maintained in the build. Note that
194 # `FileHashes` will only be populated if `BuildOptions` has requested a
195 # `SourceProvenanceHash`.
196 #
197 # The keys to this map are file paths used as build source and the values
198 # contain the hash values for those files.
199 #
200 # If the build source came in a single package such as a gzipped tarfile
201 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
202 "a_key": { # Container message for hashes of byte content of files, used in
203 # SourceProvenance messages to verify integrity of source input to the build.
204 "fileHash": [ # Collection of file hashes.
205 { # Container message for hash values.
206 "type": "A String", # The type of hash that was performed.
207 "value": "A String", # The hash value.
208 },
209 ],
210 },
211 },
212 "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
213 # generations resolved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700214 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
215 # omitted, the latest generation will be used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "object": "A String", # Google Cloud Storage object containing the source.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700217 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 # This object must be a gzipped archive file (`.tar.gz`) containing source to
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700219 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700221 # [Bucket Name
222 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
223 },
224 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 "images": [ # A list of images to be pushed upon the successful completion of all build
226 # steps.
227 #
228 # The images are pushed using the builder service account's credentials.
229 #
230 # The digests of the pushed images will be stored in the `Build` resource's
231 # results field.
232 #
233 # If any of the images fail to be pushed, the build status is marked
234 # `FAILURE`.
235 "A String",
236 ],
237 "id": "A String", # Output only. Unique identifier of the build.
238 "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
239 # successful completion of all build steps.
240 # successful completion of all build steps.
241 "images": [ # A list of images to be pushed upon the successful completion of all build
242 # steps.
243 #
244 # The images will be pushed using the builder service account's credentials.
245 #
246 # The digests of the pushed images will be stored in the Build resource's
247 # results field.
248 #
249 # If any of the images fail to be pushed, the build is marked FAILURE.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400250 "A String",
251 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
253 # completion of all build steps.
254 #
255 # Files in the workspace matching specified paths globs will be uploaded to
256 # the specified Cloud Storage location using the builder service account's
257 # credentials.
258 #
259 # The location and generation of the uploaded objects will be stored in the
260 # Build resource's results field.
261 #
262 # If any objects fail to be pushed, the build is marked FAILURE.
263 # completion of all build steps.
264 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
265 "endTime": "A String", # End of time span.
266 "startTime": "A String", # Start of time span.
267 },
268 "paths": [ # Path globs used to match files in the build's workspace.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700269 "A String",
270 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 "location": "A String", # Cloud Storage bucket and optional object path, in the form
272 # "gs://bucket/path/to/somewhere/". (see [Bucket Name
273 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700274 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 # Files in the workspace matching any path pattern will be uploaded to
276 # Cloud Storage with this location as a prefix.
277 },
278 },
279 "projectId": "A String", # Output only. ID of the project.
280 "substitutions": { # Substitutions data for `Build` resource.
281 "a_key": "A String",
282 },
283 "source": { # Location of the source in a supported storage service. # The location of the source files to build.
284 "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
285 # Repository.
286 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
287 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700288 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
289 # regex.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 "substitutions": { # Substitutions to use in a triggered build.
292 # Should only be used with RunBuildTrigger
293 "a_key": "A String",
294 },
295 "repoName": "A String", # Required. Name of the Cloud Source Repository.
296 "tagName": "A String", # Regex matching tags to build.
297 #
298 # The syntax of the regular expressions accepted is the syntax accepted by
299 # RE2 and described at https://github.com/google/re2/wiki/Syntax
300 "branchName": "A String", # Regex matching branches to build.
301 #
302 # The syntax of the regular expressions accepted is the syntax accepted by
303 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 "dir": "A String", # Directory, relative to the source root, in which to run the build.
305 #
306 # This must be a relative path. If a step's `dir` is specified and is an
307 # absolute path, this value is ignored for that step's execution.
308 },
309 "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
310 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
311 # omitted, the latest generation will be used.
312 "object": "A String", # Google Cloud Storage object containing the source.
313 #
314 # This object must be a gzipped archive file (`.tar.gz`) containing source to
315 # build.
316 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
317 # [Bucket Name
318 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
319 },
320 },
321 "status": "A String", # Output only. Status of the build.
322 "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
323 "A String",
324 ],
325 "statusDetail": "A String", # Output only. Customer-readable message about the current status.
326 "startTime": "A String", # Output only. Time at which execution of the build was started.
327 "timing": { # Output only. Stores timing information for phases of the build. Valid keys
328 # are:
329 #
330 # * BUILD: time to execute all build steps
331 # * PUSH: time to push all specified images.
332 # * FETCHSOURCE: time to fetch source.
333 #
334 # If the build does not specify source or images,
335 # these keys will not be included.
336 "a_key": { # Start and end times for a build execution phase.
337 "endTime": "A String", # End of time span.
338 "startTime": "A String", # Start of time span.
339 },
340 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer
342 # than this value, the build will expire and the build status will be
343 # `EXPIRED`.
344 #
345 # The TTL starts ticking from create_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 "createTime": "A String", # Output only. Time at which the request to create the build was received.
347 "finishTime": "A String", # Output only. Time at which execution of the build was finished.
348 #
349 # The difference between finish_time and start_time is the duration of the
350 # build's execution.
351 "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
352 # was triggered automatically.
353 "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
354 { # Pairs a set of secret environment variables containing encrypted
355 # values with the Cloud KMS key to use to decrypt the value.
356 "secretEnv": { # Map of environment variable name to its encrypted value.
357 #
358 # Secret environment variables must be unique across all of a build's
359 # secrets, and must be used by at least one build step. Values can be at most
360 # 64 KB in size. There can be at most 100 secret values across all of a
361 # build's secrets.
362 "a_key": "A String",
363 },
364 "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
365 },
366 ],
367 "steps": [ # Required. The operations to be performed on the workspace.
368 { # A step in the build pipeline.
369 "status": "A String", # Output only. Status of the build step. At this time, build step status is
370 # only updated on build completion; step status is not updated in real-time
371 # as the build progresses.
372 "args": [ # A list of arguments that will be presented to the step when it is started.
373 #
374 # If the image used to run the step's container has an entrypoint, the `args`
375 # are used as arguments to that entrypoint. If the image does not define
376 # an entrypoint, the first element in args is used as the entrypoint,
377 # and the remainder will be used as arguments.
378 "A String",
379 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700380 "name": "A String", # Required. The name of the container image that will run this particular
381 # build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700383 # If the image is available in the host's Docker daemon's cache, it
384 # will be run directly. If not, the host will attempt to pull the image
385 # first, using the builder service account's credentials if necessary.
386 #
387 # The Docker daemon's cache will already have the latest versions of all of
388 # the officially supported build steps
389 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
390 # The Docker daemon will also have cached many of the layers for some popular
391 # images, like "ubuntu", "debian", but they will be refreshed at the time you
392 # attempt to use them.
393 #
394 # If you built an image in a previous build step, it will be stored in the
395 # host's Docker daemon's cache and is available to use as the name for a
396 # later build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
398 # This build step will not start until all the build steps in `wait_for`
399 # have completed successfully. If `wait_for` is empty, this build step will
400 # start when all previous build steps in the `Build.Steps` list have
401 # completed successfully.
402 "A String",
403 ],
404 "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
405 # time limit and will be allowed to continue to run until either it completes
406 # or the build itself times out.
407 "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
408 # Management Service crypto key. These values must be specified in the
409 # build's `Secret`.
410 "A String",
411 ],
412 "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
413 # If unset, the image's default entrypoint is used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 "env": [ # A list of environment variable definitions to be used when running a step.
415 #
416 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
417 # being given the value "VALUE".
418 "A String",
419 ],
420 "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
421 # builder image only.
422 "endTime": "A String", # End of time span.
423 "startTime": "A String", # Start of time span.
424 },
425 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
426 "endTime": "A String", # End of time span.
427 "startTime": "A String", # Start of time span.
428 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 "volumes": [ # List of volumes to mount into the build step.
430 #
431 # Each volume is created as an empty volume prior to execution of the
432 # build step. Upon completion of the build, volumes and their contents are
433 # discarded.
434 #
435 # Using a named volume in only one step is not valid as it is indicative
436 # of a build request with an incorrect configuration.
437 { # Volume describes a Docker container volume which is mounted into build steps
438 # in order to persist files across build step execution.
439 "path": "A String", # Path at which to mount the volume.
440 #
441 # Paths must be absolute and cannot conflict with other volume paths on the
442 # same build step or with certain reserved volume paths.
443 "name": "A String", # Name of the volume to mount.
444 #
445 # Volume names must be unique per build step and must be valid names for
446 # Docker volumes. Each named volume must be used by at least two build steps.
447 },
448 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 "id": "A String", # Unique identifier for this build step, used in `wait_for` to
450 # reference this build step as a dependency.
451 "dir": "A String", # Working directory to use when running this step's container.
452 #
453 # If this value is a relative path, it is relative to the build's working
454 # directory. If this value is absolute, it may be outside the build's working
455 # directory, in which case the contents of the path may not be persisted
456 # across build step executions, unless a `volume` for that path is specified.
457 #
458 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
459 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
460 # the step's execution.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700461 },
462 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700463 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
464 # granularity. If this amount of time elapses, work on the build will cease
465 # and the build status will be `TIMEOUT`.
466 #
467 # Default time is ten minutes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400468 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
469 # [Bucket Name
470 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
471 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
473 "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
474 # checks.
Dan O'Mearadd494642020-05-01 07:42:23 -0700475 "machineType": "A String", # Compute Engine machine type on which to run the build.
476 "workerPool": "A String", # Option to specify a `WorkerPool` for the build.
477 # Format: projects/{project}/workerPools/{workerPool}
478 #
479 # This field is experimental.
480 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
481 "A String",
482 ],
483 "env": [ # A list of global environment variable definitions that will exist for all
484 # build steps in this build. If a variable is defined in both globally and in
485 # a build step, the variable will use the build step value.
486 #
487 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
488 # being given the value "VALUE".
489 "A String",
490 ],
491 "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
492 # Storage.
493 "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
494 # Key Management Service crypto key. These values must be specified in the
495 # build's `Secret`. These variables will be available to all build steps
496 # in this build.
497 "A String",
498 ],
499 "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
500 # "disk free"; some of the space will be used by the operating system and
501 # build utilities. Also note that this is the minimum disk size that will be
502 # allocated for the build -- the build may run with a larger disk than
503 # requested. At present, the maximum disk size is 1000GB; builds that request
504 # more than the maximum are rejected with an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 "logging": "A String", # Option to specify the logging mode, which determines where the logs are
506 # stored.
507 "volumes": [ # Global list of volumes to mount for ALL build steps
508 #
509 # Each volume is created as an empty volume prior to starting the build
510 # process. Upon completion of the build, volumes and their contents are
511 # discarded. Global volume names and paths cannot conflict with the volumes
512 # defined a build step.
513 #
514 # Using a global volume in a build with only one step is not valid as
515 # it is indicative of a build request with an incorrect configuration.
516 { # Volume describes a Docker container volume which is mounted into build steps
517 # in order to persist files across build step execution.
518 "path": "A String", # Path at which to mount the volume.
519 #
520 # Paths must be absolute and cannot conflict with other volume paths on the
521 # same build step or with certain reserved volume paths.
522 "name": "A String", # Name of the volume to mount.
523 #
524 # Volume names must be unique per build step and must be valid names for
525 # Docker volumes. Each named volume must be used by at least two build steps.
526 },
527 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 "requestedVerifyOption": "A String", # Requested verifiability options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 },
530 "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
531 }</pre>
532</div>
533
534<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 <pre>Starts a build with the specified configuration.
537
538This method returns a long-running `Operation`, which includes the build
539ID. Pass the build ID to `GetBuild` to determine the build status (such as
540`SUCCESS` or `FAILURE`).
541
542Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 projectId: string, Required. ID of the project. (required)
544 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 The object takes the form of:
546
547{ # A build resource in the Cloud Build API.
548 #
549 # At a high level, a `Build` describes where to find source code, how to build
550 # it (for example, the builder image to run on the source), and where to store
551 # the built artifacts.
552 #
553 # Fields can include the following variables, which will be expanded when the
554 # build is created:
555 #
556 # - $PROJECT_ID: the project ID of the build.
557 # - $BUILD_ID: the autogenerated ID of the build.
558 # - $REPO_NAME: the source repository name specified by RepoSource.
559 # - $BRANCH_NAME: the branch name specified by RepoSource.
560 # - $TAG_NAME: the tag name specified by RepoSource.
561 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
562 # resolved from the specified branch or tag.
563 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
564 "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
565 "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
566 # corresponding to build step indices.
567 #
568 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
569 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
570 # Only the first 4KB of data is stored.
571 "A String",
572 ],
573 "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
574 "endTime": "A String", # End of time span.
575 "startTime": "A String", # Start of time span.
576 },
577 "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
578 "images": [ # Container images that were built as a part of the build.
579 { # An image built by the pipeline.
580 "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
581 "endTime": "A String", # End of time span.
582 "startTime": "A String", # Start of time span.
583 },
584 "name": "A String", # Name used to push the container image to Google Container Registry, as
585 # presented to `docker push`.
586 "digest": "A String", # Docker Registry 2.0 digest.
587 },
588 ],
589 "buildStepImages": [ # List of build step digests, in the order corresponding to build step
590 # indices.
591 "A String",
592 ],
593 "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
594 },
595 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
596 # some source was used for this build.
597 "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
598 # revisions resolved.
599 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
600 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
602 # regex.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -0700604 "substitutions": { # Substitutions to use in a triggered build.
605 # Should only be used with RunBuildTrigger
606 "a_key": "A String",
607 },
608 "repoName": "A String", # Required. Name of the Cloud Source Repository.
609 "tagName": "A String", # Regex matching tags to build.
610 #
611 # The syntax of the regular expressions accepted is the syntax accepted by
612 # RE2 and described at https://github.com/google/re2/wiki/Syntax
613 "branchName": "A String", # Regex matching branches to build.
614 #
615 # The syntax of the regular expressions accepted is the syntax accepted by
616 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 "dir": "A String", # Directory, relative to the source root, in which to run the build.
618 #
619 # This must be a relative path. If a step's `dir` is specified and is an
620 # absolute path, this value is ignored for that step's execution.
621 },
622 "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
623 # the original source integrity was maintained in the build. Note that
624 # `FileHashes` will only be populated if `BuildOptions` has requested a
625 # `SourceProvenanceHash`.
626 #
627 # The keys to this map are file paths used as build source and the values
628 # contain the hash values for those files.
629 #
630 # If the build source came in a single package such as a gzipped tarfile
631 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
632 "a_key": { # Container message for hashes of byte content of files, used in
633 # SourceProvenance messages to verify integrity of source input to the build.
634 "fileHash": [ # Collection of file hashes.
635 { # Container message for hash values.
636 "type": "A String", # The type of hash that was performed.
637 "value": "A String", # The hash value.
638 },
639 ],
640 },
641 },
642 "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
643 # generations resolved.
644 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
645 # omitted, the latest generation will be used.
646 "object": "A String", # Google Cloud Storage object containing the source.
647 #
648 # This object must be a gzipped archive file (`.tar.gz`) containing source to
649 # build.
650 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
651 # [Bucket Name
652 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
653 },
654 },
655 "images": [ # A list of images to be pushed upon the successful completion of all build
656 # steps.
657 #
658 # The images are pushed using the builder service account's credentials.
659 #
660 # The digests of the pushed images will be stored in the `Build` resource's
661 # results field.
662 #
663 # If any of the images fail to be pushed, the build status is marked
664 # `FAILURE`.
665 "A String",
666 ],
667 "id": "A String", # Output only. Unique identifier of the build.
668 "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
669 # successful completion of all build steps.
670 # successful completion of all build steps.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700671 "images": [ # A list of images to be pushed upon the successful completion of all build
672 # steps.
673 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800674 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700675 #
676 # The digests of the pushed images will be stored in the Build resource's
677 # results field.
678 #
679 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700680 "A String",
681 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
683 # completion of all build steps.
684 #
685 # Files in the workspace matching specified paths globs will be uploaded to
686 # the specified Cloud Storage location using the builder service account's
687 # credentials.
688 #
689 # The location and generation of the uploaded objects will be stored in the
690 # Build resource's results field.
691 #
692 # If any objects fail to be pushed, the build is marked FAILURE.
693 # completion of all build steps.
694 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
695 "endTime": "A String", # End of time span.
696 "startTime": "A String", # Start of time span.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700697 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 "paths": [ # Path globs used to match files in the build's workspace.
699 "A String",
700 ],
701 "location": "A String", # Cloud Storage bucket and optional object path, in the form
702 # "gs://bucket/path/to/somewhere/". (see [Bucket Name
703 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
704 #
705 # Files in the workspace matching any path pattern will be uploaded to
706 # Cloud Storage with this location as a prefix.
707 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700708 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 "projectId": "A String", # Output only. ID of the project.
710 "substitutions": { # Substitutions data for `Build` resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400711 "a_key": "A String",
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400712 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 "source": { # Location of the source in a supported storage service. # The location of the source files to build.
714 "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400715 # Repository.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
717 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
719 # regex.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400720 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 "substitutions": { # Substitutions to use in a triggered build.
722 # Should only be used with RunBuildTrigger
723 "a_key": "A String",
724 },
725 "repoName": "A String", # Required. Name of the Cloud Source Repository.
726 "tagName": "A String", # Regex matching tags to build.
727 #
728 # The syntax of the regular expressions accepted is the syntax accepted by
729 # RE2 and described at https://github.com/google/re2/wiki/Syntax
730 "branchName": "A String", # Regex matching branches to build.
731 #
732 # The syntax of the regular expressions accepted is the syntax accepted by
733 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 "dir": "A String", # Directory, relative to the source root, in which to run the build.
735 #
736 # This must be a relative path. If a step's `dir` is specified and is an
737 # absolute path, this value is ignored for that step's execution.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400738 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700740 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
741 # omitted, the latest generation will be used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700742 "object": "A String", # Google Cloud Storage object containing the source.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700743 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 # This object must be a gzipped archive file (`.tar.gz`) containing source to
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700745 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700747 # [Bucket Name
748 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
749 },
750 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 "status": "A String", # Output only. Status of the build.
752 "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
753 "A String",
754 ],
755 "statusDetail": "A String", # Output only. Customer-readable message about the current status.
756 "startTime": "A String", # Output only. Time at which execution of the build was started.
757 "timing": { # Output only. Stores timing information for phases of the build. Valid keys
758 # are:
759 #
760 # * BUILD: time to execute all build steps
761 # * PUSH: time to push all specified images.
762 # * FETCHSOURCE: time to fetch source.
763 #
764 # If the build does not specify source or images,
765 # these keys will not be included.
766 "a_key": { # Start and end times for a build execution phase.
767 "endTime": "A String", # End of time span.
768 "startTime": "A String", # Start of time span.
769 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400770 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer
772 # than this value, the build will expire and the build status will be
773 # `EXPIRED`.
774 #
775 # The TTL starts ticking from create_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 "createTime": "A String", # Output only. Time at which the request to create the build was received.
777 "finishTime": "A String", # Output only. Time at which execution of the build was finished.
778 #
779 # The difference between finish_time and start_time is the duration of the
780 # build's execution.
781 "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
782 # was triggered automatically.
783 "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
784 { # Pairs a set of secret environment variables containing encrypted
785 # values with the Cloud KMS key to use to decrypt the value.
786 "secretEnv": { # Map of environment variable name to its encrypted value.
787 #
788 # Secret environment variables must be unique across all of a build's
789 # secrets, and must be used by at least one build step. Values can be at most
790 # 64 KB in size. There can be at most 100 secret values across all of a
791 # build's secrets.
792 "a_key": "A String",
793 },
794 "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
795 },
796 ],
797 "steps": [ # Required. The operations to be performed on the workspace.
798 { # A step in the build pipeline.
799 "status": "A String", # Output only. Status of the build step. At this time, build step status is
800 # only updated on build completion; step status is not updated in real-time
801 # as the build progresses.
802 "args": [ # A list of arguments that will be presented to the step when it is started.
803 #
804 # If the image used to run the step's container has an entrypoint, the `args`
805 # are used as arguments to that entrypoint. If the image does not define
806 # an entrypoint, the first element in args is used as the entrypoint,
807 # and the remainder will be used as arguments.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700808 "A String",
809 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 "name": "A String", # Required. The name of the container image that will run this particular
811 # build step.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700812 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 # If the image is available in the host's Docker daemon's cache, it
814 # will be run directly. If not, the host will attempt to pull the image
815 # first, using the builder service account's credentials if necessary.
816 #
817 # The Docker daemon's cache will already have the latest versions of all of
818 # the officially supported build steps
819 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
820 # The Docker daemon will also have cached many of the layers for some popular
821 # images, like "ubuntu", "debian", but they will be refreshed at the time you
822 # attempt to use them.
823 #
824 # If you built an image in a previous build step, it will be stored in the
825 # host's Docker daemon's cache and is available to use as the name for a
826 # later build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
828 # This build step will not start until all the build steps in `wait_for`
829 # have completed successfully. If `wait_for` is empty, this build step will
830 # start when all previous build steps in the `Build.Steps` list have
831 # completed successfully.
832 "A String",
833 ],
834 "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
835 # time limit and will be allowed to continue to run until either it completes
836 # or the build itself times out.
837 "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
838 # Management Service crypto key. These values must be specified in the
839 # build's `Secret`.
840 "A String",
841 ],
842 "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
843 # If unset, the image's default entrypoint is used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 "env": [ # A list of environment variable definitions to be used when running a step.
845 #
846 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
847 # being given the value "VALUE".
848 "A String",
849 ],
850 "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
851 # builder image only.
852 "endTime": "A String", # End of time span.
853 "startTime": "A String", # Start of time span.
854 },
855 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
856 "endTime": "A String", # End of time span.
857 "startTime": "A String", # Start of time span.
858 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700859 "volumes": [ # List of volumes to mount into the build step.
860 #
861 # Each volume is created as an empty volume prior to execution of the
862 # build step. Upon completion of the build, volumes and their contents are
863 # discarded.
864 #
865 # Using a named volume in only one step is not valid as it is indicative
866 # of a build request with an incorrect configuration.
867 { # Volume describes a Docker container volume which is mounted into build steps
868 # in order to persist files across build step execution.
869 "path": "A String", # Path at which to mount the volume.
870 #
871 # Paths must be absolute and cannot conflict with other volume paths on the
872 # same build step or with certain reserved volume paths.
873 "name": "A String", # Name of the volume to mount.
874 #
875 # Volume names must be unique per build step and must be valid names for
876 # Docker volumes. Each named volume must be used by at least two build steps.
877 },
878 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 "id": "A String", # Unique identifier for this build step, used in `wait_for` to
880 # reference this build step as a dependency.
881 "dir": "A String", # Working directory to use when running this step's container.
882 #
883 # If this value is a relative path, it is relative to the build's working
884 # directory. If this value is absolute, it may be outside the build's working
885 # directory, in which case the contents of the path may not be persisted
886 # across build step executions, unless a `volume` for that path is specified.
887 #
888 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
889 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
890 # the step's execution.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700891 },
892 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
894 # granularity. If this amount of time elapses, work on the build will cease
895 # and the build status will be `TIMEOUT`.
896 #
897 # Default time is ten minutes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400898 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
899 # [Bucket Name
900 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
901 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
903 "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
904 # checks.
Dan O'Mearadd494642020-05-01 07:42:23 -0700905 "machineType": "A String", # Compute Engine machine type on which to run the build.
906 "workerPool": "A String", # Option to specify a `WorkerPool` for the build.
907 # Format: projects/{project}/workerPools/{workerPool}
908 #
909 # This field is experimental.
910 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
911 "A String",
912 ],
913 "env": [ # A list of global environment variable definitions that will exist for all
914 # build steps in this build. If a variable is defined in both globally and in
915 # a build step, the variable will use the build step value.
916 #
917 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
918 # being given the value "VALUE".
919 "A String",
920 ],
921 "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
922 # Storage.
923 "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
924 # Key Management Service crypto key. These values must be specified in the
925 # build's `Secret`. These variables will be available to all build steps
926 # in this build.
927 "A String",
928 ],
929 "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
930 # "disk free"; some of the space will be used by the operating system and
931 # build utilities. Also note that this is the minimum disk size that will be
932 # allocated for the build -- the build may run with a larger disk than
933 # requested. At present, the maximum disk size is 1000GB; builds that request
934 # more than the maximum are rejected with an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 "logging": "A String", # Option to specify the logging mode, which determines where the logs are
936 # stored.
937 "volumes": [ # Global list of volumes to mount for ALL build steps
938 #
939 # Each volume is created as an empty volume prior to starting the build
940 # process. Upon completion of the build, volumes and their contents are
941 # discarded. Global volume names and paths cannot conflict with the volumes
942 # defined a build step.
943 #
944 # Using a global volume in a build with only one step is not valid as
945 # it is indicative of a build request with an incorrect configuration.
946 { # Volume describes a Docker container volume which is mounted into build steps
947 # in order to persist files across build step execution.
948 "path": "A String", # Path at which to mount the volume.
949 #
950 # Paths must be absolute and cannot conflict with other volume paths on the
951 # same build step or with certain reserved volume paths.
952 "name": "A String", # Name of the volume to mount.
953 #
954 # Volume names must be unique per build step and must be valid names for
955 # Docker volumes. Each named volume must be used by at least two build steps.
956 },
957 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 "requestedVerifyOption": "A String", # Requested verifiability options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 },
960 "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700961}
962
963 x__xgafv: string, V1 error format.
964 Allowed values
965 1 - v1 error format
966 2 - v2 error format
967
968Returns:
969 An object of the form:
970
971 { # This resource represents a long-running operation that is the result of a
972 # network API call.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 "metadata": { # Service-specific metadata associated with the operation. It typically
974 # contains progress information and common metadata such as create time.
975 # Some services might not provide such metadata. Any method that returns a
976 # long-running operation should document the metadata type, if any.
977 "a_key": "", # Properties of the object. Contains field @type with type URL.
978 },
979 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
980 # different programming environments, including REST APIs and RPC APIs. It is
981 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
982 # three pieces of data: error code, error message, and error details.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700983 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 # You can find out more about this error model and how to work with it in the
985 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700986 "message": "A String", # A developer-facing error message, which should be in English. Any
987 # user-facing error message should be localized and sent in the
988 # google.rpc.Status.details field, or localized by the client.
989 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700990 "details": [ # A list of messages that carry the error details. There is a common set of
991 # message types for APIs to use.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700992 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700993 "a_key": "", # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700994 },
995 ],
996 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400997 "done": True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400999 # available.
1000 "response": { # The normal response of the operation in case of success. If the original
1001 # method returns no data on success, such as `Delete`, the response is
1002 # `google.protobuf.Empty`. If the original method is standard
1003 # `Get`/`Create`/`Update`, the response should be the resource. For other
1004 # methods, the response should have the type `XxxResponse`, where `Xxx`
1005 # is the original method name. For example, if the original method name
1006 # is `TakeSnapshot()`, the inferred response type is
1007 # `TakeSnapshotResponse`.
1008 "a_key": "", # Properties of the object. Contains field @type with type URL.
1009 },
1010 "name": "A String", # The server-assigned name, which is only unique within the same service that
1011 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 # `name` should be a resource name ending with `operations/{unique_id}`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001013 }</pre>
1014</div>
1015
1016<div class="method">
1017 <code class="details" id="get">get(projectId, id, x__xgafv=None)</code>
1018 <pre>Returns information about a previously requested build.
1019
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020The `Build` that is returned includes its status (such as `SUCCESS`,
1021`FAILURE`, or `WORKING`), and timing information.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001022
1023Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001024 projectId: string, Required. ID of the project. (required)
1025 id: string, Required. ID of the build. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001026 x__xgafv: string, V1 error format.
1027 Allowed values
1028 1 - v1 error format
1029 2 - v2 error format
1030
1031Returns:
1032 An object of the form:
1033
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 { # A build resource in the Cloud Build API.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001035 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 # At a high level, a `Build` describes where to find source code, how to build
1037 # it (for example, the builder image to run on the source), and where to store
1038 # the built artifacts.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001039 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001041 # build is created:
1042 #
1043 # - $PROJECT_ID: the project ID of the build.
1044 # - $BUILD_ID: the autogenerated ID of the build.
1045 # - $REPO_NAME: the source repository name specified by RepoSource.
1046 # - $BRANCH_NAME: the branch name specified by RepoSource.
1047 # - $TAG_NAME: the tag name specified by RepoSource.
1048 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1049 # resolved from the specified branch or tag.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1051 "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
1052 "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
1053 # corresponding to build step indices.
1054 #
1055 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1056 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1057 # Only the first 4KB of data is stored.
1058 "A String",
1059 ],
1060 "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1061 "endTime": "A String", # End of time span.
1062 "startTime": "A String", # Start of time span.
1063 },
1064 "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
1065 "images": [ # Container images that were built as a part of the build.
1066 { # An image built by the pipeline.
1067 "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1068 "endTime": "A String", # End of time span.
1069 "startTime": "A String", # Start of time span.
1070 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001071 "name": "A String", # Name used to push the container image to Google Container Registry, as
1072 # presented to `docker push`.
1073 "digest": "A String", # Docker Registry 2.0 digest.
1074 },
1075 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001076 "buildStepImages": [ # List of build step digests, in the order corresponding to build step
1077 # indices.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001078 "A String",
1079 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001081 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1083 # some source was used for this build.
1084 "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
1085 # revisions resolved.
1086 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1087 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
1089 # regex.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001090 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -07001091 "substitutions": { # Substitutions to use in a triggered build.
1092 # Should only be used with RunBuildTrigger
1093 "a_key": "A String",
1094 },
1095 "repoName": "A String", # Required. Name of the Cloud Source Repository.
1096 "tagName": "A String", # Regex matching tags to build.
1097 #
1098 # The syntax of the regular expressions accepted is the syntax accepted by
1099 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1100 "branchName": "A String", # Regex matching branches to build.
1101 #
1102 # The syntax of the regular expressions accepted is the syntax accepted by
1103 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001104 "dir": "A String", # Directory, relative to the source root, in which to run the build.
1105 #
1106 # This must be a relative path. If a step's `dir` is specified and is an
1107 # absolute path, this value is ignored for that step's execution.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001108 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001109 "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
1110 # the original source integrity was maintained in the build. Note that
1111 # `FileHashes` will only be populated if `BuildOptions` has requested a
1112 # `SourceProvenanceHash`.
1113 #
1114 # The keys to this map are file paths used as build source and the values
1115 # contain the hash values for those files.
1116 #
1117 # If the build source came in a single package such as a gzipped tarfile
1118 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1119 "a_key": { # Container message for hashes of byte content of files, used in
1120 # SourceProvenance messages to verify integrity of source input to the build.
1121 "fileHash": [ # Collection of file hashes.
1122 { # Container message for hash values.
1123 "type": "A String", # The type of hash that was performed.
1124 "value": "A String", # The hash value.
1125 },
1126 ],
1127 },
1128 },
1129 "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
1130 # generations resolved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001131 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1132 # omitted, the latest generation will be used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 "object": "A String", # Google Cloud Storage object containing the source.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001134 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 # This object must be a gzipped archive file (`.tar.gz`) containing source to
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001136 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001137 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001138 # [Bucket Name
1139 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1140 },
1141 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001142 "images": [ # A list of images to be pushed upon the successful completion of all build
1143 # steps.
1144 #
1145 # The images are pushed using the builder service account's credentials.
1146 #
1147 # The digests of the pushed images will be stored in the `Build` resource's
1148 # results field.
1149 #
1150 # If any of the images fail to be pushed, the build status is marked
1151 # `FAILURE`.
1152 "A String",
1153 ],
1154 "id": "A String", # Output only. Unique identifier of the build.
1155 "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1156 # successful completion of all build steps.
1157 # successful completion of all build steps.
1158 "images": [ # A list of images to be pushed upon the successful completion of all build
1159 # steps.
1160 #
1161 # The images will be pushed using the builder service account's credentials.
1162 #
1163 # The digests of the pushed images will be stored in the Build resource's
1164 # results field.
1165 #
1166 # If any of the images fail to be pushed, the build is marked FAILURE.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001167 "A String",
1168 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001169 "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1170 # completion of all build steps.
1171 #
1172 # Files in the workspace matching specified paths globs will be uploaded to
1173 # the specified Cloud Storage location using the builder service account's
1174 # credentials.
1175 #
1176 # The location and generation of the uploaded objects will be stored in the
1177 # Build resource's results field.
1178 #
1179 # If any objects fail to be pushed, the build is marked FAILURE.
1180 # completion of all build steps.
1181 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1182 "endTime": "A String", # End of time span.
1183 "startTime": "A String", # Start of time span.
1184 },
1185 "paths": [ # Path globs used to match files in the build's workspace.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001186 "A String",
1187 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001188 "location": "A String", # Cloud Storage bucket and optional object path, in the form
1189 # "gs://bucket/path/to/somewhere/". (see [Bucket Name
1190 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001191 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 # Files in the workspace matching any path pattern will be uploaded to
1193 # Cloud Storage with this location as a prefix.
1194 },
1195 },
1196 "projectId": "A String", # Output only. ID of the project.
1197 "substitutions": { # Substitutions data for `Build` resource.
1198 "a_key": "A String",
1199 },
1200 "source": { # Location of the source in a supported storage service. # The location of the source files to build.
1201 "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
1202 # Repository.
1203 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1204 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -07001205 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
1206 # regex.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -07001208 "substitutions": { # Substitutions to use in a triggered build.
1209 # Should only be used with RunBuildTrigger
1210 "a_key": "A String",
1211 },
1212 "repoName": "A String", # Required. Name of the Cloud Source Repository.
1213 "tagName": "A String", # Regex matching tags to build.
1214 #
1215 # The syntax of the regular expressions accepted is the syntax accepted by
1216 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1217 "branchName": "A String", # Regex matching branches to build.
1218 #
1219 # The syntax of the regular expressions accepted is the syntax accepted by
1220 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001221 "dir": "A String", # Directory, relative to the source root, in which to run the build.
1222 #
1223 # This must be a relative path. If a step's `dir` is specified and is an
1224 # absolute path, this value is ignored for that step's execution.
1225 },
1226 "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1227 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1228 # omitted, the latest generation will be used.
1229 "object": "A String", # Google Cloud Storage object containing the source.
1230 #
1231 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1232 # build.
1233 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
1234 # [Bucket Name
1235 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1236 },
1237 },
1238 "status": "A String", # Output only. Status of the build.
1239 "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
1240 "A String",
1241 ],
1242 "statusDetail": "A String", # Output only. Customer-readable message about the current status.
1243 "startTime": "A String", # Output only. Time at which execution of the build was started.
1244 "timing": { # Output only. Stores timing information for phases of the build. Valid keys
1245 # are:
1246 #
1247 # * BUILD: time to execute all build steps
1248 # * PUSH: time to push all specified images.
1249 # * FETCHSOURCE: time to fetch source.
1250 #
1251 # If the build does not specify source or images,
1252 # these keys will not be included.
1253 "a_key": { # Start and end times for a build execution phase.
1254 "endTime": "A String", # End of time span.
1255 "startTime": "A String", # Start of time span.
1256 },
1257 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer
1259 # than this value, the build will expire and the build status will be
1260 # `EXPIRED`.
1261 #
1262 # The TTL starts ticking from create_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001263 "createTime": "A String", # Output only. Time at which the request to create the build was received.
1264 "finishTime": "A String", # Output only. Time at which execution of the build was finished.
1265 #
1266 # The difference between finish_time and start_time is the duration of the
1267 # build's execution.
1268 "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1269 # was triggered automatically.
1270 "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
1271 { # Pairs a set of secret environment variables containing encrypted
1272 # values with the Cloud KMS key to use to decrypt the value.
1273 "secretEnv": { # Map of environment variable name to its encrypted value.
1274 #
1275 # Secret environment variables must be unique across all of a build's
1276 # secrets, and must be used by at least one build step. Values can be at most
1277 # 64 KB in size. There can be at most 100 secret values across all of a
1278 # build's secrets.
1279 "a_key": "A String",
1280 },
1281 "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
1282 },
1283 ],
1284 "steps": [ # Required. The operations to be performed on the workspace.
1285 { # A step in the build pipeline.
1286 "status": "A String", # Output only. Status of the build step. At this time, build step status is
1287 # only updated on build completion; step status is not updated in real-time
1288 # as the build progresses.
1289 "args": [ # A list of arguments that will be presented to the step when it is started.
1290 #
1291 # If the image used to run the step's container has an entrypoint, the `args`
1292 # are used as arguments to that entrypoint. If the image does not define
1293 # an entrypoint, the first element in args is used as the entrypoint,
1294 # and the remainder will be used as arguments.
1295 "A String",
1296 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001297 "name": "A String", # Required. The name of the container image that will run this particular
1298 # build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001299 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001300 # If the image is available in the host's Docker daemon's cache, it
1301 # will be run directly. If not, the host will attempt to pull the image
1302 # first, using the builder service account's credentials if necessary.
1303 #
1304 # The Docker daemon's cache will already have the latest versions of all of
1305 # the officially supported build steps
1306 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1307 # The Docker daemon will also have cached many of the layers for some popular
1308 # images, like "ubuntu", "debian", but they will be refreshed at the time you
1309 # attempt to use them.
1310 #
1311 # If you built an image in a previous build step, it will be stored in the
1312 # host's Docker daemon's cache and is available to use as the name for a
1313 # later build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001314 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1315 # This build step will not start until all the build steps in `wait_for`
1316 # have completed successfully. If `wait_for` is empty, this build step will
1317 # start when all previous build steps in the `Build.Steps` list have
1318 # completed successfully.
1319 "A String",
1320 ],
1321 "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
1322 # time limit and will be allowed to continue to run until either it completes
1323 # or the build itself times out.
1324 "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
1325 # Management Service crypto key. These values must be specified in the
1326 # build's `Secret`.
1327 "A String",
1328 ],
1329 "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
1330 # If unset, the image's default entrypoint is used.
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 "env": [ # A list of environment variable definitions to be used when running a step.
1332 #
1333 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1334 # being given the value "VALUE".
1335 "A String",
1336 ],
1337 "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
1338 # builder image only.
1339 "endTime": "A String", # End of time span.
1340 "startTime": "A String", # Start of time span.
1341 },
1342 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1343 "endTime": "A String", # End of time span.
1344 "startTime": "A String", # Start of time span.
1345 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 "volumes": [ # List of volumes to mount into the build step.
1347 #
1348 # Each volume is created as an empty volume prior to execution of the
1349 # build step. Upon completion of the build, volumes and their contents are
1350 # discarded.
1351 #
1352 # Using a named volume in only one step is not valid as it is indicative
1353 # of a build request with an incorrect configuration.
1354 { # Volume describes a Docker container volume which is mounted into build steps
1355 # in order to persist files across build step execution.
1356 "path": "A String", # Path at which to mount the volume.
1357 #
1358 # Paths must be absolute and cannot conflict with other volume paths on the
1359 # same build step or with certain reserved volume paths.
1360 "name": "A String", # Name of the volume to mount.
1361 #
1362 # Volume names must be unique per build step and must be valid names for
1363 # Docker volumes. Each named volume must be used by at least two build steps.
1364 },
1365 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001366 "id": "A String", # Unique identifier for this build step, used in `wait_for` to
1367 # reference this build step as a dependency.
1368 "dir": "A String", # Working directory to use when running this step's container.
1369 #
1370 # If this value is a relative path, it is relative to the build's working
1371 # directory. If this value is absolute, it may be outside the build's working
1372 # directory, in which case the contents of the path may not be persisted
1373 # across build step executions, unless a `volume` for that path is specified.
1374 #
1375 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1376 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1377 # the step's execution.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001378 },
1379 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001380 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1381 # granularity. If this amount of time elapses, work on the build will cease
1382 # and the build status will be `TIMEOUT`.
1383 #
1384 # Default time is ten minutes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001385 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1386 # [Bucket Name
1387 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1388 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001389 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1390 "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
1391 # checks.
Dan O'Mearadd494642020-05-01 07:42:23 -07001392 "machineType": "A String", # Compute Engine machine type on which to run the build.
1393 "workerPool": "A String", # Option to specify a `WorkerPool` for the build.
1394 # Format: projects/{project}/workerPools/{workerPool}
1395 #
1396 # This field is experimental.
1397 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1398 "A String",
1399 ],
1400 "env": [ # A list of global environment variable definitions that will exist for all
1401 # build steps in this build. If a variable is defined in both globally and in
1402 # a build step, the variable will use the build step value.
1403 #
1404 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1405 # being given the value "VALUE".
1406 "A String",
1407 ],
1408 "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
1409 # Storage.
1410 "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
1411 # Key Management Service crypto key. These values must be specified in the
1412 # build's `Secret`. These variables will be available to all build steps
1413 # in this build.
1414 "A String",
1415 ],
1416 "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
1417 # "disk free"; some of the space will be used by the operating system and
1418 # build utilities. Also note that this is the minimum disk size that will be
1419 # allocated for the build -- the build may run with a larger disk than
1420 # requested. At present, the maximum disk size is 1000GB; builds that request
1421 # more than the maximum are rejected with an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001422 "logging": "A String", # Option to specify the logging mode, which determines where the logs are
1423 # stored.
1424 "volumes": [ # Global list of volumes to mount for ALL build steps
1425 #
1426 # Each volume is created as an empty volume prior to starting the build
1427 # process. Upon completion of the build, volumes and their contents are
1428 # discarded. Global volume names and paths cannot conflict with the volumes
1429 # defined a build step.
1430 #
1431 # Using a global volume in a build with only one step is not valid as
1432 # it is indicative of a build request with an incorrect configuration.
1433 { # Volume describes a Docker container volume which is mounted into build steps
1434 # in order to persist files across build step execution.
1435 "path": "A String", # Path at which to mount the volume.
1436 #
1437 # Paths must be absolute and cannot conflict with other volume paths on the
1438 # same build step or with certain reserved volume paths.
1439 "name": "A String", # Name of the volume to mount.
1440 #
1441 # Volume names must be unique per build step and must be valid names for
1442 # Docker volumes. Each named volume must be used by at least two build steps.
1443 },
1444 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001445 "requestedVerifyOption": "A String", # Requested verifiability options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 },
1447 "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001448 }</pre>
1449</div>
1450
1451<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001452 <code class="details" id="list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None, filter=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001453 <pre>Lists previously requested builds.
1454
1455Previously requested builds may still be in-progress, or may have finished
1456successfully or unsuccessfully.
1457
1458Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001459 projectId: string, Required. ID of the project. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001460 pageSize: integer, Number of results to return in the list.
1461 pageToken: string, Token to provide to skip to a particular spot in the list.
1462 x__xgafv: string, V1 error format.
1463 Allowed values
1464 1 - v1 error format
1465 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001466 filter: string, The raw filter text to constrain the results.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001467
1468Returns:
1469 An object of the form:
1470
1471 { # Response including listed builds.
1472 "nextPageToken": "A String", # Token to receive the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001473 "builds": [ # Builds will be sorted by `create_time`, descending.
1474 { # A build resource in the Cloud Build API.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001475 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001476 # At a high level, a `Build` describes where to find source code, how to build
1477 # it (for example, the builder image to run on the source), and where to store
1478 # the built artifacts.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001479 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001481 # build is created:
1482 #
1483 # - $PROJECT_ID: the project ID of the build.
1484 # - $BUILD_ID: the autogenerated ID of the build.
1485 # - $REPO_NAME: the source repository name specified by RepoSource.
1486 # - $BRANCH_NAME: the branch name specified by RepoSource.
1487 # - $TAG_NAME: the tag name specified by RepoSource.
1488 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1489 # resolved from the specified branch or tag.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001490 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
1491 "results": { # Artifacts created by the build pipeline. # Output only. Results of the build.
1492 "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order
1493 # corresponding to build step indices.
1494 #
1495 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1496 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1497 # Only the first 4KB of data is stored.
1498 "A String",
1499 ],
1500 "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1501 "endTime": "A String", # End of time span.
1502 "startTime": "A String", # Start of time span.
1503 },
1504 "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded.
1505 "images": [ # Container images that were built as a part of the build.
1506 { # An image built by the pipeline.
1507 "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1508 "endTime": "A String", # End of time span.
1509 "startTime": "A String", # Start of time span.
1510 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001511 "name": "A String", # Name used to push the container image to Google Container Registry, as
1512 # presented to `docker push`.
1513 "digest": "A String", # Docker Registry 2.0 digest.
1514 },
1515 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516 "buildStepImages": [ # List of build step digests, in the order corresponding to build step
1517 # indices.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001518 "A String",
1519 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001520 "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001521 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1523 # some source was used for this build.
1524 "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any
1525 # revisions resolved.
1526 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1527 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -07001528 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
1529 # regex.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001530 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -07001531 "substitutions": { # Substitutions to use in a triggered build.
1532 # Should only be used with RunBuildTrigger
1533 "a_key": "A String",
1534 },
1535 "repoName": "A String", # Required. Name of the Cloud Source Repository.
1536 "tagName": "A String", # Regex matching tags to build.
1537 #
1538 # The syntax of the regular expressions accepted is the syntax accepted by
1539 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1540 "branchName": "A String", # Regex matching branches to build.
1541 #
1542 # The syntax of the regular expressions accepted is the syntax accepted by
1543 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 "dir": "A String", # Directory, relative to the source root, in which to run the build.
1545 #
1546 # This must be a relative path. If a step's `dir` is specified and is an
1547 # absolute path, this value is ignored for that step's execution.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001548 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001549 "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that
1550 # the original source integrity was maintained in the build. Note that
1551 # `FileHashes` will only be populated if `BuildOptions` has requested a
1552 # `SourceProvenanceHash`.
1553 #
1554 # The keys to this map are file paths used as build source and the values
1555 # contain the hash values for those files.
1556 #
1557 # If the build source came in a single package such as a gzipped tarfile
1558 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1559 "a_key": { # Container message for hashes of byte content of files, used in
1560 # SourceProvenance messages to verify integrity of source input to the build.
1561 "fileHash": [ # Collection of file hashes.
1562 { # Container message for hash values.
1563 "type": "A String", # The type of hash that was performed.
1564 "value": "A String", # The hash value.
1565 },
1566 ],
1567 },
1568 },
1569 "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any
1570 # generations resolved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001571 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1572 # omitted, the latest generation will be used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001573 "object": "A String", # Google Cloud Storage object containing the source.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001574 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 # This object must be a gzipped archive file (`.tar.gz`) containing source to
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001576 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001577 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001578 # [Bucket Name
1579 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1580 },
1581 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001582 "images": [ # A list of images to be pushed upon the successful completion of all build
1583 # steps.
1584 #
1585 # The images are pushed using the builder service account's credentials.
1586 #
1587 # The digests of the pushed images will be stored in the `Build` resource's
1588 # results field.
1589 #
1590 # If any of the images fail to be pushed, the build status is marked
1591 # `FAILURE`.
1592 "A String",
1593 ],
1594 "id": "A String", # Output only. Unique identifier of the build.
1595 "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1596 # successful completion of all build steps.
1597 # successful completion of all build steps.
1598 "images": [ # A list of images to be pushed upon the successful completion of all build
1599 # steps.
1600 #
1601 # The images will be pushed using the builder service account's credentials.
1602 #
1603 # The digests of the pushed images will be stored in the Build resource's
1604 # results field.
1605 #
1606 # If any of the images fail to be pushed, the build is marked FAILURE.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001607 "A String",
1608 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1610 # completion of all build steps.
1611 #
1612 # Files in the workspace matching specified paths globs will be uploaded to
1613 # the specified Cloud Storage location using the builder service account's
1614 # credentials.
1615 #
1616 # The location and generation of the uploaded objects will be stored in the
1617 # Build resource's results field.
1618 #
1619 # If any objects fail to be pushed, the build is marked FAILURE.
1620 # completion of all build steps.
1621 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1622 "endTime": "A String", # End of time span.
1623 "startTime": "A String", # Start of time span.
1624 },
1625 "paths": [ # Path globs used to match files in the build's workspace.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001626 "A String",
1627 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 "location": "A String", # Cloud Storage bucket and optional object path, in the form
1629 # "gs://bucket/path/to/somewhere/". (see [Bucket Name
1630 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001631 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001632 # Files in the workspace matching any path pattern will be uploaded to
1633 # Cloud Storage with this location as a prefix.
1634 },
1635 },
1636 "projectId": "A String", # Output only. ID of the project.
1637 "substitutions": { # Substitutions data for `Build` resource.
1638 "a_key": "A String",
1639 },
1640 "source": { # Location of the source in a supported storage service. # The location of the source files to build.
1641 "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source
1642 # Repository.
1643 "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the
1644 # project ID requesting the build is assumed.
Dan O'Mearadd494642020-05-01 07:42:23 -07001645 "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision
1646 # regex.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001647 "commitSha": "A String", # Explicit commit SHA to build.
Dan O'Mearadd494642020-05-01 07:42:23 -07001648 "substitutions": { # Substitutions to use in a triggered build.
1649 # Should only be used with RunBuildTrigger
1650 "a_key": "A String",
1651 },
1652 "repoName": "A String", # Required. Name of the Cloud Source Repository.
1653 "tagName": "A String", # Regex matching tags to build.
1654 #
1655 # The syntax of the regular expressions accepted is the syntax accepted by
1656 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1657 "branchName": "A String", # Regex matching branches to build.
1658 #
1659 # The syntax of the regular expressions accepted is the syntax accepted by
1660 # RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001661 "dir": "A String", # Directory, relative to the source root, in which to run the build.
1662 #
1663 # This must be a relative path. If a step's `dir` is specified and is an
1664 # absolute path, this value is ignored for that step's execution.
1665 },
1666 "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1667 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1668 # omitted, the latest generation will be used.
1669 "object": "A String", # Google Cloud Storage object containing the source.
1670 #
1671 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1672 # build.
1673 "bucket": "A String", # Google Cloud Storage bucket containing the source (see
1674 # [Bucket Name
1675 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1676 },
1677 },
1678 "status": "A String", # Output only. Status of the build.
1679 "tags": [ # Tags for annotation of a `Build`. These are not docker tags.
1680 "A String",
1681 ],
1682 "statusDetail": "A String", # Output only. Customer-readable message about the current status.
1683 "startTime": "A String", # Output only. Time at which execution of the build was started.
1684 "timing": { # Output only. Stores timing information for phases of the build. Valid keys
1685 # are:
1686 #
1687 # * BUILD: time to execute all build steps
1688 # * PUSH: time to push all specified images.
1689 # * FETCHSOURCE: time to fetch source.
1690 #
1691 # If the build does not specify source or images,
1692 # these keys will not be included.
1693 "a_key": { # Start and end times for a build execution phase.
1694 "endTime": "A String", # End of time span.
1695 "startTime": "A String", # Start of time span.
1696 },
1697 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001698 "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer
1699 # than this value, the build will expire and the build status will be
1700 # `EXPIRED`.
1701 #
1702 # The TTL starts ticking from create_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 "createTime": "A String", # Output only. Time at which the request to create the build was received.
1704 "finishTime": "A String", # Output only. Time at which execution of the build was finished.
1705 #
1706 # The difference between finish_time and start_time is the duration of the
1707 # build's execution.
1708 "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1709 # was triggered automatically.
1710 "secrets": [ # Secrets to decrypt using Cloud Key Management Service.
1711 { # Pairs a set of secret environment variables containing encrypted
1712 # values with the Cloud KMS key to use to decrypt the value.
1713 "secretEnv": { # Map of environment variable name to its encrypted value.
1714 #
1715 # Secret environment variables must be unique across all of a build's
1716 # secrets, and must be used by at least one build step. Values can be at most
1717 # 64 KB in size. There can be at most 100 secret values across all of a
1718 # build's secrets.
1719 "a_key": "A String",
1720 },
1721 "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs.
1722 },
1723 ],
1724 "steps": [ # Required. The operations to be performed on the workspace.
1725 { # A step in the build pipeline.
1726 "status": "A String", # Output only. Status of the build step. At this time, build step status is
1727 # only updated on build completion; step status is not updated in real-time
1728 # as the build progresses.
1729 "args": [ # A list of arguments that will be presented to the step when it is started.
1730 #
1731 # If the image used to run the step's container has an entrypoint, the `args`
1732 # are used as arguments to that entrypoint. If the image does not define
1733 # an entrypoint, the first element in args is used as the entrypoint,
1734 # and the remainder will be used as arguments.
1735 "A String",
1736 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001737 "name": "A String", # Required. The name of the container image that will run this particular
1738 # build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001739 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001740 # If the image is available in the host's Docker daemon's cache, it
1741 # will be run directly. If not, the host will attempt to pull the image
1742 # first, using the builder service account's credentials if necessary.
1743 #
1744 # The Docker daemon's cache will already have the latest versions of all of
1745 # the officially supported build steps
1746 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1747 # The Docker daemon will also have cached many of the layers for some popular
1748 # images, like "ubuntu", "debian", but they will be refreshed at the time you
1749 # attempt to use them.
1750 #
1751 # If you built an image in a previous build step, it will be stored in the
1752 # host's Docker daemon's cache and is available to use as the name for a
1753 # later build step.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001754 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1755 # This build step will not start until all the build steps in `wait_for`
1756 # have completed successfully. If `wait_for` is empty, this build step will
1757 # start when all previous build steps in the `Build.Steps` list have
1758 # completed successfully.
1759 "A String",
1760 ],
1761 "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no
1762 # time limit and will be allowed to continue to run until either it completes
1763 # or the build itself times out.
1764 "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key
1765 # Management Service crypto key. These values must be specified in the
1766 # build's `Secret`.
1767 "A String",
1768 ],
1769 "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint.
1770 # If unset, the image's default entrypoint is used.
Dan O'Mearadd494642020-05-01 07:42:23 -07001771 "env": [ # A list of environment variable definitions to be used when running a step.
1772 #
1773 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1774 # being given the value "VALUE".
1775 "A String",
1776 ],
1777 "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's
1778 # builder image only.
1779 "endTime": "A String", # End of time span.
1780 "startTime": "A String", # Start of time span.
1781 },
1782 "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1783 "endTime": "A String", # End of time span.
1784 "startTime": "A String", # Start of time span.
1785 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001786 "volumes": [ # List of volumes to mount into the build step.
1787 #
1788 # Each volume is created as an empty volume prior to execution of the
1789 # build step. Upon completion of the build, volumes and their contents are
1790 # discarded.
1791 #
1792 # Using a named volume in only one step is not valid as it is indicative
1793 # of a build request with an incorrect configuration.
1794 { # Volume describes a Docker container volume which is mounted into build steps
1795 # in order to persist files across build step execution.
1796 "path": "A String", # Path at which to mount the volume.
1797 #
1798 # Paths must be absolute and cannot conflict with other volume paths on the
1799 # same build step or with certain reserved volume paths.
1800 "name": "A String", # Name of the volume to mount.
1801 #
1802 # Volume names must be unique per build step and must be valid names for
1803 # Docker volumes. Each named volume must be used by at least two build steps.
1804 },
1805 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001806 "id": "A String", # Unique identifier for this build step, used in `wait_for` to
1807 # reference this build step as a dependency.
1808 "dir": "A String", # Working directory to use when running this step's container.
1809 #
1810 # If this value is a relative path, it is relative to the build's working
1811 # directory. If this value is absolute, it may be outside the build's working
1812 # directory, in which case the contents of the path may not be persisted
1813 # across build step executions, unless a `volume` for that path is specified.
1814 #
1815 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1816 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1817 # the step's execution.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001818 },
1819 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001820 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1821 # granularity. If this amount of time elapses, work on the build will cease
1822 # and the build status will be `TIMEOUT`.
1823 #
1824 # Default time is ten minutes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001825 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1826 # [Bucket Name
1827 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1828 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001829 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1830 "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution
1831 # checks.
Dan O'Mearadd494642020-05-01 07:42:23 -07001832 "machineType": "A String", # Compute Engine machine type on which to run the build.
1833 "workerPool": "A String", # Option to specify a `WorkerPool` for the build.
1834 # Format: projects/{project}/workerPools/{workerPool}
1835 #
1836 # This field is experimental.
1837 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1838 "A String",
1839 ],
1840 "env": [ # A list of global environment variable definitions that will exist for all
1841 # build steps in this build. If a variable is defined in both globally and in
1842 # a build step, the variable will use the build step value.
1843 #
1844 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1845 # being given the value "VALUE".
1846 "A String",
1847 ],
1848 "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud
1849 # Storage.
1850 "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud
1851 # Key Management Service crypto key. These values must be specified in the
1852 # build's `Secret`. These variables will be available to all build steps
1853 # in this build.
1854 "A String",
1855 ],
1856 "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT*
1857 # "disk free"; some of the space will be used by the operating system and
1858 # build utilities. Also note that this is the minimum disk size that will be
1859 # allocated for the build -- the build may run with a larger disk than
1860 # requested. At present, the maximum disk size is 1000GB; builds that request
1861 # more than the maximum are rejected with an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001862 "logging": "A String", # Option to specify the logging mode, which determines where the logs are
1863 # stored.
1864 "volumes": [ # Global list of volumes to mount for ALL build steps
1865 #
1866 # Each volume is created as an empty volume prior to starting the build
1867 # process. Upon completion of the build, volumes and their contents are
1868 # discarded. Global volume names and paths cannot conflict with the volumes
1869 # defined a build step.
1870 #
1871 # Using a global volume in a build with only one step is not valid as
1872 # it is indicative of a build request with an incorrect configuration.
1873 { # Volume describes a Docker container volume which is mounted into build steps
1874 # in order to persist files across build step execution.
1875 "path": "A String", # Path at which to mount the volume.
1876 #
1877 # Paths must be absolute and cannot conflict with other volume paths on the
1878 # same build step or with certain reserved volume paths.
1879 "name": "A String", # Name of the volume to mount.
1880 #
1881 # Volume names must be unique per build step and must be valid names for
1882 # Docker volumes. Each named volume must be used by at least two build steps.
1883 },
1884 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001885 "requestedVerifyOption": "A String", # Requested verifiability options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001886 },
1887 "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001888 },
1889 ],
1890 }</pre>
1891</div>
1892
1893<div class="method">
1894 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1895 <pre>Retrieves the next page of results.
1896
1897Args:
1898 previous_request: The request for the previous page. (required)
1899 previous_response: The response from the request for the previous page. (required)
1900
1901Returns:
1902 A request object that you can call 'execute()' on to request the next
1903 page. Returns None if there are no more items in the collection.
1904 </pre>
1905</div>
1906
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907<div class="method">
1908 <code class="details" id="retry">retry(projectId, id, body=None, x__xgafv=None)</code>
1909 <pre>Creates a new build based on the specified build.
1910
1911This method creates a new build using the original build request, which may
1912or may not result in an identical build.
1913
1914For triggered builds:
1915
1916* Triggered builds resolve to a precise revision; therefore a retry of a
1917triggered build will result in a build that uses the same revision.
1918
1919For non-triggered builds that specify `RepoSource`:
1920
1921* If the original build built from the tip of a branch, the retried build
1922will build from the tip of that branch, which may not be the same revision
1923as the original build.
1924* If the original build specified a commit sha or revision ID, the retried
1925build will use the identical source.
1926
1927For builds that specify `StorageSource`:
1928
1929* If the original build pulled source from Google Cloud Storage without
1930specifying the generation of the object, the new build will use the current
1931object, which may be different from the original build source.
1932* If the original build pulled source from Cloud Storage and specified the
1933generation of the object, the new build will attempt to use the same
1934object, which may or may not be available depending on the bucket's
1935lifecycle management settings.
1936
1937Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001938 projectId: string, Required. ID of the project. (required)
1939 id: string, Required. Build ID of the original build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001940 body: object, The request body.
1941 The object takes the form of:
1942
1943{ # Specifies a build to retry.
1944 }
1945
1946 x__xgafv: string, V1 error format.
1947 Allowed values
1948 1 - v1 error format
1949 2 - v2 error format
1950
1951Returns:
1952 An object of the form:
1953
1954 { # This resource represents a long-running operation that is the result of a
1955 # network API call.
1956 "metadata": { # Service-specific metadata associated with the operation. It typically
1957 # contains progress information and common metadata such as create time.
1958 # Some services might not provide such metadata. Any method that returns a
1959 # long-running operation should document the metadata type, if any.
1960 "a_key": "", # Properties of the object. Contains field @type with type URL.
1961 },
1962 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1963 # different programming environments, including REST APIs and RPC APIs. It is
1964 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1965 # three pieces of data: error code, error message, and error details.
1966 #
1967 # You can find out more about this error model and how to work with it in the
1968 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1969 "message": "A String", # A developer-facing error message, which should be in English. Any
1970 # user-facing error message should be localized and sent in the
1971 # google.rpc.Status.details field, or localized by the client.
1972 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1973 "details": [ # A list of messages that carry the error details. There is a common set of
1974 # message types for APIs to use.
1975 {
1976 "a_key": "", # Properties of the object. Contains field @type with type URL.
1977 },
1978 ],
1979 },
1980 "done": True or False, # If the value is `false`, it means the operation is still in progress.
1981 # If `true`, the operation is completed, and either `error` or `response` is
1982 # available.
1983 "response": { # The normal response of the operation in case of success. If the original
1984 # method returns no data on success, such as `Delete`, the response is
1985 # `google.protobuf.Empty`. If the original method is standard
1986 # `Get`/`Create`/`Update`, the response should be the resource. For other
1987 # methods, the response should have the type `XxxResponse`, where `Xxx`
1988 # is the original method name. For example, if the original method name
1989 # is `TakeSnapshot()`, the inferred response type is
1990 # `TakeSnapshotResponse`.
1991 "a_key": "", # Properties of the object. Contains field @type with type URL.
1992 },
1993 "name": "A String", # The server-assigned name, which is only unique within the same service that
1994 # originally returns it. If you use the default HTTP mapping, the
1995 # `name` should be a resource name ending with `operations/{unique_id}`.
1996 }</pre>
1997</div>
1998
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001999</body></html>